mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
fields-insteadof-split
This commit is contained in:
parent
2593ee5a38
commit
727a91759b
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue