mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 05:36:46 +00:00
internal/build: using strings.Lines
This commit is contained in:
parent
41f580f209
commit
4853c804d5
1 changed files with 5 additions and 1 deletions
|
|
@ -158,7 +158,11 @@ func LocalEnv() Environment {
|
||||||
}
|
}
|
||||||
|
|
||||||
func firstLine(s string) string {
|
func firstLine(s string) string {
|
||||||
return strings.Split(s, "\n")[0]
|
for line := range strings.Lines(s) {
|
||||||
|
line, _ = strings.CutSuffix(line, "\n")
|
||||||
|
return line
|
||||||
|
}
|
||||||
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func getDate(commit string) string {
|
func getDate(commit string) string {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue