File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 12
12
linters :
13
13
disable-all : true
14
14
enable :
15
- - deadcode
16
15
- goconst
17
16
- goimports
18
17
- gosimple
19
18
- govet
20
19
- ineffassign
21
20
- misspell
22
- # - staticcheck
23
21
- unconvert
24
- # - unused
25
- - varcheck
26
22
- typecheck
27
-
23
+ - unused
24
+ - staticcheck
25
+ - bidichk
26
+ - durationcheck
27
+ - exportloopref
28
+ - whitespace
28
29
29
30
linters-settings :
30
31
gofmt :
Original file line number Diff line number Diff line change @@ -1013,21 +1013,21 @@ func doPurge(cmdline []string) {
1013
1013
1014
1014
// Iterate over the blobs, collect and sort all unstable builds
1015
1015
for i := 0 ; i < len (blobs ); i ++ {
1016
- if ! strings .Contains (* blobs [i ].Name , "unstable" ) {
1016
+ if ! strings .Contains (blobs [i ].Name , "unstable" ) {
1017
1017
blobs = append (blobs [:i ], blobs [i + 1 :]... )
1018
1018
i --
1019
1019
}
1020
1020
}
1021
1021
for i := 0 ; i < len (blobs ); i ++ {
1022
1022
for j := i + 1 ; j < len (blobs ); j ++ {
1023
- if blobs [i ].Properties .LastModified .After (* blobs [j ].Properties .LastModified ) {
1023
+ if blobs [i ].Properties .LastModified .After (blobs [j ].Properties .LastModified ) {
1024
1024
blobs [i ], blobs [j ] = blobs [j ], blobs [i ]
1025
1025
}
1026
1026
}
1027
1027
}
1028
1028
// Filter out all archives more recent that the given threshold
1029
1029
for i , blob := range blobs {
1030
- if time .Since (* blob .Properties .LastModified ) < time .Duration (* limit )* 24 * time .Hour {
1030
+ if time .Since (blob .Properties .LastModified ) < time .Duration (* limit )* 24 * time .Hour {
1031
1031
blobs = blobs [:i ]
1032
1032
break
1033
1033
}
You can’t perform that action at this time.
0 commit comments