diff options
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/hosts.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hosts/hosts.go b/hosts/hosts.go index 63433cb..23883e2 100644 --- a/hosts/hosts.go +++ b/hosts/hosts.go @@ -54,7 +54,7 @@ func Load() (map[netip.Addr][32]byte, error) { for line := 1; scanner.Scan(); line++ { host, pubkey, err := parseHostKeyPair(scanner.Text()) if err != nil { - return hosts, fmt.Errorf("error parsing known hosts file: %s:%d: %v", err) + return hosts, fmt.Errorf("error parsing known hosts file: %s:%d: %v", knownHostsFile, line, err) } if _, ok := hosts[host]; ok { return hosts, fmt.Errorf("duplicate entry in known hosts file: %s", host) @@ -97,7 +97,7 @@ func Store(hosts map[netip.Addr][32]byte) error { defer f.Close() for host, key := range hosts { - fmt.Fprintf(f, "%s %x", host, key) + fmt.Fprintf(f, "%s %x\n", host, key) } return nil |