[PR #9] [MERGED] Fix ToRaw() method in hostlines #26

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

📋 Pull Request Information

Original PR: https://github.com/goodhosts/hostsfile/pull/9
Author: @ShivalikRanaut
Created: 6/8/2020
Status: Merged
Merged: 6/8/2020
Merged by: @luthermonson

Base: masterHead: master


📝 Commits (1)

  • 37bf539 Fix ToRaw() method in hostlines

📊 Changes

2 files changed (+20 additions, -0 deletions)

View changed files

📝 hosts_test.go (+16 -0)
📝 hostsline.go (+4 -0)

📄 Description

Each call to Flush() rewrites the hosts file with the content .

Earlier ToRaw() method used in Flush() to format lines before writing was ignoring comments.
Added check to include comments


🔄 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/9 **Author:** [@ShivalikRanaut](https://github.com/ShivalikRanaut) **Created:** 6/8/2020 **Status:** ✅ Merged **Merged:** 6/8/2020 **Merged by:** [@luthermonson](https://github.com/luthermonson) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`37bf539`](https://github.com/goodhosts/hostsfile/commit/37bf5393328a97ab78ce6b65d7553eebd9bccd29) Fix ToRaw() method in hostlines ### 📊 Changes **2 files changed** (+20 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `hosts_test.go` (+16 -0) 📝 `hostsline.go` (+4 -0) </details> ### 📄 Description Each call to Flush() rewrites the hosts file with the content . Earlier ToRaw() method used in Flush() to format lines before writing was ignoring comments. Added check to include comments --- <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:13 +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#26
No description provided.