Some small nits around the codebase to make linters happy. (#181)

This commit is contained in:
Markus Thömmes
2020-08-10 08:21:31 -07:00
committed by GitHub
parent 6e4a93eee0
commit ecce857be6
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -151,7 +151,7 @@ func TestGoBuildNoKoData(t *testing.T) {
}
importpath := "github.com/google/ko"
creationTime := v1.Time{time.Unix(5000, 0)}
creationTime := v1.Time{Time: time.Unix(5000, 0)}
ng, err := NewGo(
WithCreationTime(creationTime),
WithBaseImages(func(string) (v1.Image, error) { return base, nil }),
@@ -231,7 +231,7 @@ func TestGoBuild(t *testing.T) {
}
importpath := "github.com/google/ko"
creationTime := v1.Time{time.Unix(5000, 0)}
creationTime := v1.Time{Time: time.Unix(5000, 0)}
ng, err := NewGo(
WithCreationTime(creationTime),
WithBaseImages(func(string) (v1.Image, error) { return base, nil }),
+1 -1
View File
@@ -64,7 +64,7 @@ func getCreationTime() (*v1.Time, error) {
if err != nil {
return nil, fmt.Errorf("the environment variable SOURCE_DATE_EPOCH should be the number of seconds since January 1st 1970, 00:00 UTC, got: %v", err)
}
return &v1.Time{time.Unix(seconds, 0)}, nil
return &v1.Time{Time: time.Unix(seconds, 0)}, nil
}
func createCancellableContext() context.Context {
+2 -2
View File
@@ -261,7 +261,7 @@ func TestStrict(t *testing.T) {
}
}
base := mustRepository("gcr.io/multi-pass")
doc := strToYAML(t, string(buf.Bytes()))
doc := strToYAML(t, buf.String())
err := ImageReferences(context.Background(), []*yaml.Node{doc}, true, testBuilder, kotesting.NewFixedPublish(base, testHashes))
if err != nil {
@@ -280,7 +280,7 @@ func TestNoStrictKoPrefixRemains(t *testing.T) {
}
base := mustRepository("gcr.io/multi-pass")
doc := strToYAML(t, string(buf.Bytes()))
doc := strToYAML(t, buf.String())
noMatchBuilder := kotesting.NewFixedBuild(nil)