fields-insteadof-split

This commit is contained in:
H 2019-05-02 14:47:57 -05:00 committed by Péter Szilágyi
parent 2593ee5a38
commit 727a91759b
No known key found for this signature in database
GPG key ID: E9AE538CEDF8293D

View file

@ -89,8 +89,8 @@ func LocalEnv() Environment {
env := applyEnvFlags(Environment{Name: "local", Repo: "ethereum/go-ethereum"}) env := applyEnvFlags(Environment{Name: "local", Repo: "ethereum/go-ethereum"})
head := readGitFile("HEAD") head := readGitFile("HEAD")
if splits := strings.Split(head, " "); len(splits) == 2 { if fields := strings.Fields(head); len(fields) == 2 {
head = splits[1] head = fields[1]
} else { } else {
return env return env
} }