Skip to content

Commit 525f818

Browse files
authored
Merge pull request #311 from hs0210/work
Fix golint issues caused by typos
2 parents 5ec3b8e + 59a235b commit 525f818

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

analyzer/option.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ type Option func(opts *analyzerOpts)
3838
// SpecOpts returns runtime configuration based on the passed image and rootfs path.
3939
type SpecOpts func(image containerd.Image, rootfs string) (opts []oci.SpecOpts, done func() error, err error)
4040

41-
// WithSpecGenerator is the runtime configuration
41+
// WithSpecOpts is the runtime configuration
4242
func WithSpecOpts(specOpts SpecOpts) Option {
4343
return func(opts *analyzerOpts) {
4444
opts.specOpts = specOpts
4545
}
4646
}
4747

48-
// WIthTerminal enable terminal for the container. This must be specified with WithStdin().
48+
// WithTerminal enable terminal for the container. This must be specified with WithStdin().
4949
func WithTerminal() Option {
5050
return func(opts *analyzerOpts) {
5151
opts.terminal = true

fs/source/source.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
3131
)
3232

33-
// GetSource is a function for converting snapshot labels into typed blob sources
33+
// GetSources is a function for converting snapshot labels into typed blob sources
3434
// information. This package defines a default converter which provides source
3535
// information based on some labels but implementations aren't required to use labels.
3636
// Implementations are allowed to return several sources (registry config + image refs)

util/testutil/tar.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ type TarEntry interface {
3232
AppendTar(tw *tar.Writer, opts Options) error
3333
}
3434

35-
// Option is a set of options used during building blob.
35+
// Options is a set of options used during building blob.
3636
type Options struct {
3737

3838
// Prefix is the prefix string need to be added to each file name (e.g. "./", "/", etc.)
3939
Prefix string
4040
}
4141

42-
// Options is an option used during building blob.
42+
// Option is an option used during building blob.
4343
type Option func(o *Options)
4444

4545
// WithPrefix is an option to add a prefix string to each file name (e.g. "./", "/", etc.)
@@ -77,7 +77,7 @@ type tarEntryFunc func(*tar.Writer, Options) error
7777

7878
func (f tarEntryFunc) AppendTar(tw *tar.Writer, opts Options) error { return f(tw, opts) }
7979

80-
// DirecoryOption is an option for a directory entry.
80+
// DirectoryOption is an option for a directory entry.
8181
type DirectoryOption func(o *dirOpts)
8282

8383
type dirOpts struct {
@@ -102,7 +102,7 @@ func WithDirXattrs(xattrs map[string]string) DirectoryOption {
102102
}
103103
}
104104

105-
// WithFileMode specifies the mode of the directory.
105+
// WithDirMode specifies the mode of the directory.
106106
func WithDirMode(mode os.FileMode) DirectoryOption {
107107
return func(o *dirOpts) {
108108
o.mode = &mode

0 commit comments

Comments
 (0)