mirror of
https://github.com/goodhosts/hostsfile.git
synced 2026-04-27 15:35:50 +03:00
[GH-ISSUE #38] Regression - panic when calling Clear and then Add #11
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#11
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 @guscott on GitHub (May 3, 2022).
Original GitHub issue: https://github.com/goodhosts/hostsfile/issues/38
Version: 0.1.1
When calling Hosts.Clear() to remove lines from the hosts file and then regenerating the file with Hosts.Add cause a panic on this line:
hostsCopy := h.Lines[position[0]].Hostsbecauseposition[0]use the new lookup.When calling Hosts.Clear, it should also clear the lookup information.
This was working on version 0.0.8.