Skip to content

Commit 4dc932e

Browse files
committed
[release/1.6] gofmt with go1.19
it looks like golangci-lint's gofmt check uses go1.19 rules, despite being run with go1.18. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 7b8d679 commit 4dc932e

35 files changed

Lines changed: 185 additions & 172 deletions

File tree

archive/tar_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func setHeaderForSpecialDevice(hdr *tar.Header, name string, fi os.FileInfo) err
6363
}
6464

6565
// Rdev is int32 on darwin/bsd, int64 on linux/solaris
66-
rdev := uint64(s.Rdev) // nolint: unconvert
66+
rdev := uint64(s.Rdev) //nolint:unconvert
6767

6868
// Currently go does not fill in the major/minors
6969
if s.Mode&syscall.S_IFBLK != 0 ||

cmd/containerd/command/service_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ func launchService(s *server.Server, done chan struct{}) error {
307307
done: done,
308308
}
309309

310-
interactive, err := svc.IsAnInteractiveSession() // nolint:staticcheck
310+
interactive, err := svc.IsAnInteractiveSession() //nolint:staticcheck
311311
if err != nil {
312312
return err
313313
}

content/local/store.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,6 @@ func (s *store) ingestRoot(ref string) string {
643643
// - root: entire ingest directory
644644
// - ref: name of the starting ref, must be unique
645645
// - data: file where data is written
646-
//
647646
func (s *store) ingestPaths(ref string) (string, string, string) {
648647
var (
649648
fp = s.ingestRoot(ref)

contrib/fuzz/content_fuzzer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616

17-
// nolint: golint
17+
//nolint:golint
1818
package fuzz
1919

2020
import (

filters/filter.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
// ```
6666
// name==foo,labels.bar
6767
// ```
68-
//
6968
package filters
7069

7170
import (

filters/parser.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ field := quoted | [A-Za-z] [A-Za-z0-9_]+
4545
operator := "==" | "!=" | "~="
4646
value := quoted | [^\s,]+
4747
quoted := <go string syntax>
48-
4948
*/
5049
func Parse(s string) (Filter, error) {
5150
// special case empty to match all

filters/quote.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ var errQuoteSyntax = errors.New("quote syntax error")
3131
// or character literal represented by the string s.
3232
// It returns four values:
3333
//
34-
// 1) value, the decoded Unicode code point or byte value;
35-
// 2) multibyte, a boolean indicating whether the decoded character requires a multibyte UTF-8 representation;
36-
// 3) tail, the remainder of the string after the character; and
37-
// 4) an error that will be nil if the character is syntactically valid.
34+
// 1. value, the decoded Unicode code point or byte value;
35+
// 2. multibyte, a boolean indicating whether the decoded character requires a multibyte UTF-8 representation;
36+
// 3. tail, the remainder of the string after the character; and
37+
// 4. an error that will be nil if the character is syntactically valid.
3838
//
3939
// The second argument, quote, specifies the type of literal being parsed
4040
// and therefore which escaped quote character is permitted.

images/archive/importer.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ func WithImportCompression() ImportOpt {
5555
}
5656

5757
// ImportIndex imports an index from a tar archive image bundle
58-
// - implements Docker v1.1, v1.2 and OCI v1.
59-
// - prefers OCI v1 when provided
60-
// - creates OCI index for Docker formats
61-
// - normalizes Docker references and adds as OCI ref name
62-
// e.g. alpine:latest -> docker.io/library/alpine:latest
63-
// - existing OCI reference names are untouched
58+
// - implements Docker v1.1, v1.2 and OCI v1.
59+
// - prefers OCI v1 when provided
60+
// - creates OCI index for Docker formats
61+
// - normalizes Docker references and adds as OCI ref name
62+
// e.g. alpine:latest -> docker.io/library/alpine:latest
63+
// - existing OCI reference names are untouched
6464
func ImportIndex(ctx context.Context, store content.Store, reader io.Reader, opts ...ImportOpt) (ocispec.Descriptor, error) {
6565
var (
6666
tr = tar.NewReader(reader)

integration/client/restart_monitor_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ import (
3737
)
3838

3939
// the following nolint is for shutting up gometalinter on non-linux.
40-
// nolint: unused
40+
//
41+
//nolint:unused
4142
func newDaemonWithConfig(t *testing.T, configTOML string) (*Client, *daemon, func()) {
4243
if testing.Short() {
4344
t.Skip()

metadata/buckets.go

Lines changed: 68 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
//
2727
// Generically, we try to do the following:
2828
//
29-
// <version>/<namespace>/<object>/<key> -> <field>
29+
// <version>/<namespace>/<object>/<key> -> <field>
3030
//
3131
// version: Currently, this is "v1". Additions can be made to v1 in a backwards
3232
// compatible way. If the layout changes, a new version must be made, along
@@ -46,72 +46,73 @@
4646
// the structure is changed in addition to adding a migration and incrementing
4747
// the database version. Note that `╘══*...*` refers to maps with arbitrary
4848
// keys.
49-
// ├──version : <varint> - Latest version, see migrations
50-
// └──v1 - Schema version bucket
51-
// ╘══*namespace*
52-
// ├──labels
53-
// │  ╘══*key* : <string> - Label value
54-
// ├──image
55-
// │  ╘══*image name*
56-
// │   ├──createdat : <binary time> - Created at
57-
// │   ├──updatedat : <binary time> - Updated at
58-
// │   ├──target
59-
// │   │  ├──digest : <digest> - Descriptor digest
60-
// │   │  ├──mediatype : <string> - Descriptor media type
61-
// │   │  └──size : <varint> - Descriptor size
62-
// │   └──labels
63-
// │   ╘══*key* : <string> - Label value
64-
// ├──containers
65-
// │  ╘══*container id*
66-
// │   ├──createdat : <binary time> - Created at
67-
// │   ├──updatedat : <binary time> - Updated at
68-
// │   ├──spec : <binary> - Proto marshaled spec
69-
// │   ├──image : <string> - Image name
70-
// │   ├──snapshotter : <string> - Snapshotter name
71-
// │   ├──snapshotKey : <string> - Snapshot key
72-
// │   ├──runtime
73-
// │   │  ├──name : <string> - Runtime name
74-
// │   │  ├──extensions
75-
// │   │  │  ╘══*name* : <binary> - Proto marshaled extension
76-
// │   │  └──options : <binary> - Proto marshaled options
77-
// │   └──labels
78-
// │   ╘══*key* : <string> - Label value
79-
// ├──snapshots
80-
// │  ╘══*snapshotter*
81-
// │   ╘══*snapshot key*
82-
// │    ├──name : <string> - Snapshot name in backend
83-
// │   ├──createdat : <binary time> - Created at
84-
// │   ├──updatedat : <binary time> - Updated at
85-
// │    ├──parent : <string> - Parent snapshot name
86-
// │   ├──children
87-
// │   │  ╘══*snapshot key* : <nil> - Child snapshot reference
88-
// │   └──labels
89-
// │   ╘══*key* : <string> - Label value
90-
// ├──content
91-
// │  ├──blob
92-
// │  │ ╘══*blob digest*
93-
// │  │ ├──createdat : <binary time> - Created at
94-
// │  │ ├──updatedat : <binary time> - Updated at
95-
// │  │   ├──size : <varint> - Blob size
96-
// │  │ └──labels
97-
// │  │ ╘══*key* : <string> - Label value
98-
// │  └──ingests
99-
// │   ╘══*ingest reference*
100-
// │    ├──ref : <string> - Ingest reference in backend
101-
// │   ├──expireat : <binary time> - Time to expire ingest
102-
// │   └──expected : <digest> - Expected commit digest
103-
// └──leases
104-
// ╘══*lease id*
105-
//   ├──createdat : <binary time> - Created at
106-
// ├──labels
107-
// │ ╘══*key* : <string> - Label value
108-
//   ├──snapshots
109-
// │  ╘══*snapshotter*
110-
// │   ╘══*snapshot key* : <nil> - Snapshot reference
111-
//   ├──content
112-
// │  ╘══*blob digest* : <nil> - Content blob reference
113-
// └──ingests
114-
//   ╘══*ingest reference* : <nil> - Content ingest reference
49+
//
50+
// ├──version : <varint> - Latest version, see migrations
51+
// └──v1 - Schema version bucket
52+
// ╘══*namespace*
53+
// ├──labels
54+
// │  ╘══*key* : <string> - Label value
55+
// ├──image
56+
// │  ╘══*image name*
57+
// │   ├──createdat : <binary time> - Created at
58+
// │   ├──updatedat : <binary time> - Updated at
59+
// │   ├──target
60+
// │   │  ├──digest : <digest> - Descriptor digest
61+
// │   │  ├──mediatype : <string> - Descriptor media type
62+
// │   │  └──size : <varint> - Descriptor size
63+
// │   └──labels
64+
// │   ╘══*key* : <string> - Label value
65+
// ├──containers
66+
// │  ╘══*container id*
67+
// │   ├──createdat : <binary time> - Created at
68+
// │   ├──updatedat : <binary time> - Updated at
69+
// │   ├──spec : <binary> - Proto marshaled spec
70+
// │   ├──image : <string> - Image name
71+
// │   ├──snapshotter : <string> - Snapshotter name
72+
// │   ├──snapshotKey : <string> - Snapshot key
73+
// │   ├──runtime
74+
// │   │  ├──name : <string> - Runtime name
75+
// │   │  ├──extensions
76+
// │   │  │  ╘══*name* : <binary> - Proto marshaled extension
77+
// │   │  └──options : <binary> - Proto marshaled options
78+
// │   └──labels
79+
// │   ╘══*key* : <string> - Label value
80+
// ├──snapshots
81+
// │  ╘══*snapshotter*
82+
// │   ╘══*snapshot key*
83+
// │    ├──name : <string> - Snapshot name in backend
84+
// │   ├──createdat : <binary time> - Created at
85+
// │   ├──updatedat : <binary time> - Updated at
86+
// │    ├──parent : <string> - Parent snapshot name
87+
// │   ├──children
88+
// │   │  ╘══*snapshot key* : <nil> - Child snapshot reference
89+
// │   └──labels
90+
// │   ╘══*key* : <string> - Label value
91+
// ├──content
92+
// │  ├──blob
93+
// │  │ ╘══*blob digest*
94+
// │  │ ├──createdat : <binary time> - Created at
95+
// │  │ ├──updatedat : <binary time> - Updated at
96+
// │  │   ├──size : <varint> - Blob size
97+
// │  │ └──labels
98+
// │  │ ╘══*key* : <string> - Label value
99+
// │  └──ingests
100+
// │   ╘══*ingest reference*
101+
// │    ├──ref : <string> - Ingest reference in backend
102+
// │   ├──expireat : <binary time> - Time to expire ingest
103+
// │   └──expected : <digest> - Expected commit digest
104+
// └──leases
105+
// ╘══*lease id*
106+
//   ├──createdat : <binary time> - Created at
107+
// ├──labels
108+
// │ ╘══*key* : <string> - Label value
109+
//   ├──snapshots
110+
// │  ╘══*snapshotter*
111+
// │   ╘══*snapshot key* : <nil> - Snapshot reference
112+
//   ├──content
113+
// │  ╘══*blob digest* : <nil> - Content blob reference
114+
// └──ingests
115+
//   ╘══*ingest reference* : <nil> - Content ingest reference
115116
package metadata
116117

117118
import (

0 commit comments

Comments
 (0)