Skip to content

Commit 3b7fcef

Browse files
committed
ref(pkg): placate new go metalinter warnings
1 parent b792f27 commit 3b7fcef

4 files changed

Lines changed: 10 additions & 7 deletions

File tree

pkg/conf/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ const (
1515
gcsKey = "key.json"
1616
)
1717

18-
var BuilderKeyLocation string = "/var/run/secrets/api/auth/builder-key"
18+
// BuilderKeyLocation holds the path of the builder key secret.
19+
var BuilderKeyLocation = "/var/run/secrets/api/auth/builder-key"
1920

2021
// Parameters is map which contains storage params
2122
type Parameters map[string]interface{}

pkg/gitreceive/build.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ func build(
227227
if err == nil {
228228
log.Debug("Pod spec: %v", json)
229229
} else {
230-
log.Debug("Error creating json representaion of pod spec: %v", err)
230+
log.Debug("Error creating json representation of pod spec: %v", err)
231231
}
232232

233233
podsInterface := kubeClient.Pods(conf.PodNamespace)
@@ -290,8 +290,8 @@ func build(
290290
}
291291
log.Debug("Done")
292292

293-
procType := deisAPI.ProcessType{}
294-
if procType, err = getProcFile(storageDriver, tmpDir, slugBuilderInfo.AbsoluteProcfileKey(), bType); err != nil {
293+
procType, err := getProcFile(storageDriver, tmpDir, slugBuilderInfo.AbsoluteProcfileKey(), bType)
294+
if err != nil {
295295
return err
296296
}
297297

pkg/gitreceive/slug_builder_info.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ import (
55
)
66

77
const (
8-
slugTGZName = "slug.tgz"
8+
slugTGZName = "slug.tgz"
9+
// CacheKeyPattern is the template for location cache dirs.
910
CacheKeyPattern = "home/%s/cache"
10-
GitKeyPattern = "home/%s:git-%s"
11+
// GitKeyPattern is the template for storing git key files.
12+
GitKeyPattern = "home/%s:git-%s"
1113
)
1214

1315
// SlugBuilderInfo contains all of the object storage related information needed to pass to a

pkg/sys/fs_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
const testFilename string = "sys-fs-tests"
1111

12-
var expected []byte = []byte("temporary file's content")
12+
var expected = []byte("temporary file's content")
1313

1414
func TestRealFS(t *testing.T) {
1515
fs := RealFS()

0 commit comments

Comments
 (0)