Skip to content

Commit

Permalink
chore: Wrap long line
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Jun 25, 2023
1 parent db3b22e commit 069b111
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/chezmoi/chezmoi.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ func etcHostsFQDNHostname(fileSystem vfs.FS) (string, error) {
text = strings.TrimSpace(text)
text, _, _ = strings.Cut(text, "#")
fields := whitespaceRx.Split(text, -1)
if len(fields) > 1 && net.ParseIP(fields[0]).IsLoopback() && strings.Contains(fields[1], ".") {
if len(fields) > 1 && net.ParseIP(fields[0]).IsLoopback() &&
strings.Contains(fields[1], ".") {
return fields[1], nil
}
}
Expand Down

0 comments on commit 069b111

Please sign in to comment.