mirror of https://github.com/docker/buildx.git
lint: enable gosimple
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
a6ef9db84d
commit
f216b71ad2
|
@ -6,6 +6,7 @@ run:
|
||||||
linters:
|
linters:
|
||||||
enable:
|
enable:
|
||||||
- gofmt
|
- gofmt
|
||||||
|
- gosimple
|
||||||
- govet
|
- govet
|
||||||
- depguard
|
- depguard
|
||||||
- goimports
|
- goimports
|
||||||
|
|
|
@ -319,7 +319,7 @@ func (tp truncatedPlatforms) String() string {
|
||||||
if tpf, ok := tp.res[mpf]; ok {
|
if tpf, ok := tp.res[mpf]; ok {
|
||||||
seen[mpf] = struct{}{}
|
seen[mpf] = struct{}{}
|
||||||
if len(tpf) == 1 {
|
if len(tpf) == 1 {
|
||||||
out = append(out, fmt.Sprintf("%s", tpf[0]))
|
out = append(out, tpf[0])
|
||||||
count++
|
count++
|
||||||
} else {
|
} else {
|
||||||
hasPreferredPlatform := false
|
hasPreferredPlatform := false
|
||||||
|
@ -347,7 +347,7 @@ func (tp truncatedPlatforms) String() string {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if len(tp.res[mpf]) == 1 {
|
if len(tp.res[mpf]) == 1 {
|
||||||
out = append(out, fmt.Sprintf("%s", tp.res[mpf][0]))
|
out = append(out, tp.res[mpf][0])
|
||||||
count++
|
count++
|
||||||
} else {
|
} else {
|
||||||
hasPreferredPlatform := false
|
hasPreferredPlatform := false
|
||||||
|
|
|
@ -22,9 +22,7 @@ func (w *writer) Write(status *client.SolveStatus) {
|
||||||
w.ch <- ToControlStatus(status)
|
w.ch <- ToControlStatus(status)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *writer) WriteBuildRef(target string, ref string) {
|
func (w *writer) WriteBuildRef(target string, ref string) {}
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (w *writer) ValidateLogSource(digest.Digest, interface{}) bool {
|
func (w *writer) ValidateLogSource(digest.Digest, interface{}) bool {
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -55,7 +55,7 @@ func fromReader(l progress.SubLogger, rc io.ReadCloser) error {
|
||||||
Started: &now,
|
Started: &now,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
timeDelta := time.Now().Sub(st.Timestamp)
|
timeDelta := time.Since(st.Timestamp)
|
||||||
if timeDelta < minTimeDelta {
|
if timeDelta < minTimeDelta {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue