mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	add goroutine to check hosts file for updates (#1180)
* add goroutine to check hosts file for updates * rename parseFile to parseReader, remove extra error check
This commit is contained in:
		| @@ -9,12 +9,11 @@ import ( | ||||
| 	"reflect" | ||||
| 	"strings" | ||||
| 	"testing" | ||||
| 	"time" | ||||
| ) | ||||
|  | ||||
| func testHostsfile(file string) *Hostsfile { | ||||
| 	h := &Hostsfile{expire: time.Now().Add(1 * time.Hour), Origins: []string{"."}} | ||||
| 	h.Parse(strings.NewReader(file)) | ||||
| 	h := &Hostsfile{Origins: []string{"."}} | ||||
| 	h.parseReader(strings.NewReader(file)) | ||||
| 	return h | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user