[PR #45] [MERGED] Adding Testing and Fixing Logic #47

Closed
opened 2026-03-02 05:08:19 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/goodhosts/hostsfile/pull/45
Author: @luthermonson
Created: 10/1/2023
Status: Merged
Merged: 10/1/2023
Merged by: @luthermonson

Base: mainHead: dupe-tests


📝 Commits (1)

  • 7299afa fixed reordering bug in removing duplicate hosts, fixed bug where if a hostsline was only a comment it never added the comment to the line, fixed remove logic to use addLine

📊 Changes

4 files changed (+188 additions, -52 deletions)

View changed files

📝 hosts.go (+15 -9)
📝 hosts_test.go (+152 -35)
📝 hostsline.go (+13 -8)
📝 slice.go (+8 -0)

📄 Description

  • fixed reordering bug in removing duplicate hosts the map caused reordering
  • fixed bug where if a hostsline was only a comment it never added the comment to the line
  • fixed refactored Remove logic to use new addLine func to improve indexing
  • heaps of tests

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/goodhosts/hostsfile/pull/45 **Author:** [@luthermonson](https://github.com/luthermonson) **Created:** 10/1/2023 **Status:** ✅ Merged **Merged:** 10/1/2023 **Merged by:** [@luthermonson](https://github.com/luthermonson) **Base:** `main` ← **Head:** `dupe-tests` --- ### 📝 Commits (1) - [`7299afa`](https://github.com/goodhosts/hostsfile/commit/7299afa821416a5af0f0360d0992e7cfbcbd7439) fixed reordering bug in removing duplicate hosts, fixed bug where if a hostsline was only a comment it never added the comment to the line, fixed remove logic to use addLine ### 📊 Changes **4 files changed** (+188 additions, -52 deletions) <details> <summary>View changed files</summary> 📝 `hosts.go` (+15 -9) 📝 `hosts_test.go` (+152 -35) 📝 `hostsline.go` (+13 -8) 📝 `slice.go` (+8 -0) </details> ### 📄 Description * fixed reordering bug in removing duplicate hosts the map caused reordering * fixed bug where if a hostsline was only a comment it never added the comment to the line * fixed refactored Remove logic to use new addLine func to improve indexing * heaps of tests --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 05:08:19 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hostsfile#47
No description provided.