Skip to content

Commit 7ed4957

Browse files
committed
fix tests
1 parent 2f8ab1b commit 7ed4957

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

google/internal/externalaccount/header.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ func goVersion() string {
3232
s = s[:p]
3333
}
3434
return s
35+
} else if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 {
36+
s = s[:p]
3537
}
3638

3739
notSemverRune := func(r rune) bool {

google/internal/externalaccount/header_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package externalaccount
66

77
import (
8+
"runtime"
89
"testing"
910

1011
"github.com/google/go-cmp/cmp"
@@ -43,4 +44,5 @@ func TestGoVersion(t *testing.T) {
4344
t.Errorf("got(-),want(+):\n%s", diff)
4445
}
4546
}
47+
version = runtime.Version
4648
}

0 commit comments

Comments
 (0)