Skip to content

Commit f4fd9aa

Browse files
committed
Revert "Use clean to cleanup the host file for windows"
This reverts commit 3440409.
1 parent 1169529 commit f4fd9aa

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

pkg/hosts/hosts.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"fmt"
55
"os"
66
"regexp"
7-
"runtime"
87
"sort"
98
"strings"
109

@@ -76,11 +75,6 @@ func (h *Hosts) Add(ip string, hosts []string) error {
7675
if err := h.File.Add(ip, hostEntries...); err != nil {
7776
return err
7877
}
79-
// Only execute clean in case of windows to avoid more than
80-
// 9 domain entry in a single line
81-
if runtime.GOOS == "windows" {
82-
h.File.Clean()
83-
}
8478
return h.File.Flush()
8579
}
8680

0 commit comments

Comments
 (0)