From 86dd22e4829eeaf433f79085a5832882fb817903 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 21 Jan 2022 07:41:23 -0500 Subject: [PATCH] Run codespell on code Signed-off-by: Daniel J Walsh --- Makefile | 3 +++ pkg/chunked/compression.go | 2 +- pkg/pools/pools_test.go | 2 +- store.go | 2 +- types/options.go | 4 ++-- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index dbc1f7c998..a362ba65d7 100644 --- a/Makefile +++ b/Makefile @@ -51,6 +51,9 @@ sources := $(wildcard *.go cmd/containers-storage/*.go drivers/*.go drivers/*/*. containers-storage: $(sources) ## build using gc on the host $(GO) build $(MOD_VENDOR) -compiler gc $(BUILDFLAGS) ./cmd/containers-storage +codespell: + codespell -S Makefile,build,buildah,buildah.spec,imgtype,copy,AUTHORS,bin,vendor,.git,go.sum,CHANGELOG.md,changelog.txt,seccomp.json,.cirrus.yml,"*.xz,*.gz,*.tar,*.tgz,*ico,*.png,*.1,*.5,*.orig,*.rej" -L uint,iff,od,ERRO -w + binary local-binary: containers-storage local-gccgo: ## build using gccgo on the host diff --git a/pkg/chunked/compression.go b/pkg/chunked/compression.go index 96254bc4e5..649a09b1e8 100644 --- a/pkg/chunked/compression.go +++ b/pkg/chunked/compression.go @@ -87,7 +87,7 @@ func readEstargzChunkedManifest(blobStream ImageSourceSeekable, blobSize int64, - 2 bytes Extra: SI1 = 'S', SI2 = 'G' - 2 bytes Extra: LEN = 22 (16 hex digits + len("STARGZ")) - 22 bytes Extra: subfield = fmt.Sprintf("%016xSTARGZ", offsetOfTOC) - - 5 bytes flate header: BFINAL = 1(last block), BTYPE = 0(non-compressed block), LEN = 0 + - 5 bytes flat header: BFINAL = 1(last block), BTYPE = 0(non-compressed block), LEN = 0 - 8 bytes gzip footer */ tocOffset, err := strconv.ParseInt(string(footer[16:16+22-6]), 16, 64) diff --git a/pkg/pools/pools_test.go b/pkg/pools/pools_test.go index 1661b780c9..b98179d417 100644 --- a/pkg/pools/pools_test.go +++ b/pkg/pools/pools_test.go @@ -119,7 +119,7 @@ func TestBufioWriterPoolPutAndGet(t *testing.T) { // recover it defer func() { if r := recover(); r == nil { - t.Fatal("Trying to flush the writter should have 'paniced', did not.") + t.Fatal("Trying to flush the writer should have 'paniced', did not.") } }() writer.Flush() diff --git a/store.go b/store.go index 302c0f2af1..062ce6fb7a 100644 --- a/store.go +++ b/store.go @@ -647,7 +647,7 @@ func GetStore(options types.StoreOptions) (Store, error) { storesLock.Lock() defer storesLock.Unlock() - // return if BOTH run and graph root are matched, otherwise our run-root can be overriden if the graph is found first + // return if BOTH run and graph root are matched, otherwise our run-root can be overridden if the graph is found first for _, s := range stores { if (s.graphRoot == options.GraphRoot) && (s.runRoot == options.RunRoot) && (options.GraphDriverName == "" || s.graphDriverName == options.GraphDriverName) { return s, nil diff --git a/types/options.go b/types/options.go index 20d041f791..ad8377dab8 100644 --- a/types/options.go +++ b/types/options.go @@ -321,7 +321,7 @@ func ReloadConfigurationFile(configFile string, storeOptions *StoreOptions) { } } - // Clear storeOptions of previos settings + // Clear storeOptions of previous settings *storeOptions = StoreOptions{} if config.Storage.Driver != "" { storeOptions.GraphDriverName = config.Storage.Driver @@ -443,7 +443,7 @@ func Save(conf TomlConfig, rootless bool) error { return toml.NewEncoder(f).Encode(conf) } -// StorageConfig is used to retreive the storage.conf toml in order to overwrite it +// StorageConfig is used to retrieve the storage.conf toml in order to overwrite it func StorageConfig(rootless bool) (*TomlConfig, error) { config := new(TomlConfig)