Skip to content

Commit ef7f46e

Browse files
committed
Fix linter errors
Signed-off-by: Maksym Pavlenko <[email protected]>
1 parent 2b521e2 commit ef7f46e

11 files changed

Lines changed: 11 additions & 11 deletions

File tree

cmd/containerd-shim-runc-v1/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
package main
2020

2121
import (
22-
"github.com/containerd/containerd/runtime/v2/runc/v1"
22+
v1 "github.com/containerd/containerd/runtime/v2/runc/v1"
2323
"github.com/containerd/containerd/runtime/v2/shim"
2424
)
2525

cmd/containerd-shim-runc-v2/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
package main
2020

2121
import (
22-
"github.com/containerd/containerd/runtime/v2/runc/v2"
22+
v2 "github.com/containerd/containerd/runtime/v2/runc/v2"
2323
"github.com/containerd/containerd/runtime/v2/shim"
2424
)
2525

cmd/ctr/commands/events/events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ var Command = cli.Command{
4747
var e *events.Envelope
4848
select {
4949
case e = <-eventsCh:
50-
case err, open = <-errCh:
50+
case err = <-errCh:
5151
return err
5252
}
5353
if e != nil {

cmd/ctr/commands/plugins/plugins.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"github.com/containerd/containerd/api/types"
2828
"github.com/containerd/containerd/cmd/ctr/commands"
2929
"github.com/containerd/containerd/platforms"
30-
"github.com/opencontainers/image-spec/specs-go/v1"
30+
v1 "github.com/opencontainers/image-spec/specs-go/v1"
3131
"github.com/urfave/cli"
3232
"google.golang.org/grpc/codes"
3333
)

images/archive/reference.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func familiarizeReference(ref string) (string, error) {
9191
func ociReferenceName(name string) string {
9292
// OCI defines the reference name as only a tag excluding the
9393
// repository. The containerd annotation contains the full image name
94-
// since the tag is insufficent for correctly naming and referring to an
94+
// since the tag is insufficient for correctly naming and referring to an
9595
// image
9696
var ociRef string
9797
if spec, err := reference.Parse(name); err == nil {

pkg/progress/escape.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ package progress
1919
const (
2020
escape = "\x1b"
2121
reset = escape + "[0m"
22-
red = escape + "[31m" // nolint: staticcheck, varcheck
22+
red = escape + "[31m" // nolint: deadcode, varcheck, unused
2323
green = escape + "[32m"
2424
)

runtime/v2/binary.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func (b *binary) Start(ctx context.Context, opts *types.Any, onClose func()) (_
8787
defer f.Close()
8888
if _, err := io.Copy(os.Stderr, f); err != nil {
8989
// When using a multi-container shim the 2nd to Nth container in the
90-
// shim will not have a seperate log pipe. Ignore the failure log
90+
// shim will not have a separate log pipe. Ignore the failure log
9191
// message here when the shim connect times out.
9292
if !os.IsNotExist(errors.Cause(err)) {
9393
log.G(ctx).WithError(err).Error("copy shim log")

runtime/v2/runc/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ func (c *Container) Process(id string) (process.Process, error) {
261261
// ReserveProcess checks for the existence of an id and atomically
262262
// reserves the process id if it does not already exist
263263
//
264-
// Returns true if the process id was sucessfully reserved and a
264+
// Returns true if the process id was successfully reserved and a
265265
// cancel func to release the reservation
266266
func (c *Container) ReserveProcess(id string) (bool, func()) {
267267
c.mu.Lock()

runtime/v2/shim.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func loadShim(ctx context.Context, bundle *Bundle, events *exchange.Exchange, rt
7979
defer f.Close()
8080
if _, err := io.Copy(os.Stderr, f); err != nil {
8181
// When using a multi-container shim the 2nd to Nth container in the
82-
// shim will not have a seperate log pipe. Ignore the failure log
82+
// shim will not have a separate log pipe. Ignore the failure log
8383
// message here when the shim connect times out.
8484
if !os.IsNotExist(errors.Cause(err)) {
8585
log.G(ctx).WithError(err).Error("copy shim log")

services/tasks/local.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import (
4343
"github.com/containerd/containerd/plugin"
4444
"github.com/containerd/containerd/runtime"
4545
"github.com/containerd/containerd/runtime/linux/runctypes"
46-
"github.com/containerd/containerd/runtime/v2"
46+
v2 "github.com/containerd/containerd/runtime/v2"
4747
"github.com/containerd/containerd/runtime/v2/runc/options"
4848
"github.com/containerd/containerd/services"
4949
"github.com/containerd/typeurl"

0 commit comments

Comments
 (0)