mirror of
https://github.com/goodhosts/hostsfile.git
synced 2026-04-27 15:35:50 +03:00
[GH-ISSUE #51] Limiting hosts per line works for first line, but after that each item goes on its own line #16
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hostsfile#16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rfay on GitHub (Oct 28, 2023).
Original GitHub issue: https://github.com/goodhosts/hostsfile/issues/51
This isn't a huge deal, but probably not what's intended.
Using the artifacts in https://github.com/ddev/ddev/pull/4805 and running the manual test there,
You'll see the results are that the first hosts line goes to 8, but after that they are all on separate lines.
Code from
github.com/rfay/ddev@b71df9536b/pkg/ddevapp/hostname_mgt.go (L135-L146)is@luthermonson commented on GitHub (Oct 28, 2023):
I thought I had a test for that, I'll check this out today
@luthermonson commented on GitHub (Oct 29, 2023):
the good thing is i can recreate the problem and it's being caused by hosts per line being called after every add. this is definitely a bug and ill investigate further but here is how to recreate the problem with just the hostsfile package
@luthermonson commented on GitHub (Oct 29, 2023):
based on testing you should be fine with the changes in the PR i just posted. i can leave this up as a branch for a bit if you want to test and confirm before we make the merge and release.
thanks again for your help tracking this down
@rfay commented on GitHub (Oct 29, 2023):
I think the current structure was a workaround for
I'll change it to the structure you suggest. Thanks so much!
@rfay commented on GitHub (Oct 29, 2023):
Oh, I guess I can't. Normally only one host is added at a time, per
ddev hostnamecall.Here's the code,
github.com/ddev/ddev@b71df9536b/pkg/ddevapp/hostname_mgt.go (L127-L147)Can you see a workaround?
But I see
is on the way, thanks!
@luthermonson commented on GitHub (Oct 29, 2023):
https://github.com/goodhosts/hostsfile/releases/tag/v0.1.5 try this and see if youre good
@rfay commented on GitHub (Oct 29, 2023):
Sadly, it has a panic now,
I didn't change the calling code just updated the go.mod etc.
@luthermonson commented on GitHub (Oct 29, 2023):
any chance you can ping me on gophers slack?
@luthermonson commented on GitHub (Oct 29, 2023):
i believe me writng all tests to blank Hosts structs covered up a bug, can you vendor from this branch? i don't want to release again if this isn't the fix
https://github.com/goodhosts/hostsfile/pull/53
@luthermonson commented on GitHub (Oct 29, 2023):
confirmed fixed worked via chat outside of git, this is good and being released