From a5ca732256db20ee9233a2b768b1aa924357a653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Sj=C3=B6lund?= Date: Sat, 11 Feb 2023 11:16:37 +0100 Subject: [PATCH] Fix typos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Software version used https://github.com/crate-ci/typos/releases/tag/v1.13.10 The binary was downloaded from https://github.com/crate-ci/typos/releases/download/v1.13.10/typos-v1.13.10-x86_64-unknown-linux-musl.tar.gz Command that was run: typos --write-changes docs cmd cni contrib dependencies docs hack libpod pkg utils False positives were manually removed. A few marshaling/existant typos were manually fixed. Signed-off-by: Erik Sjölund --- cmd/podman/common/create.go | 10 +++++----- cmd/podman/kube/generate.go | 2 +- cmd/quadlet/main.go | 4 ++-- contrib/cirrus/logformatter.t | 4 ++-- contrib/cirrus/wsl-env-launch.ps1 | 2 +- docs/source/markdown/podman-network.1.md | 2 +- docs/source/markdown/podman-systemd.unit.5.md | 2 +- docs/tutorials/qemu-remote-tutorial.md | 2 +- libpod/boltdb_state.go | 4 ++-- libpod/options.go | 2 +- pkg/api/server/register_networks.go | 4 ++-- pkg/bindings/errors.go | 4 ++-- pkg/domain/utils/scp.go | 2 +- pkg/errorhandling/errorhandling.go | 2 +- pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go | 2 +- pkg/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go | 2 +- pkg/k8s.io/apimachinery/pkg/apis/meta/v1/time.go | 2 +- pkg/machine/e2e/config_ssh_test.go | 2 +- pkg/machine/e2e/init_test.go | 10 +++++----- pkg/machine/e2e/set_test.go | 10 +++++----- pkg/machine/e2e/ssh_test.go | 4 ++-- pkg/specgen/generate/container.go | 4 ++-- pkg/specgen/generate/oci_linux.go | 4 ++-- pkg/util/camelcase/README.md | 4 ++-- test/python/docker/compat/test_containers.py | 4 ++-- 25 files changed, 47 insertions(+), 47 deletions(-) diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go index 62b8d51021..5ed8ae8b61 100644 --- a/cmd/podman/common/create.go +++ b/cmd/podman/common/create.go @@ -17,8 +17,8 @@ const sizeWithUnitFormat = "(format: `[]`, where unit = b (bytes), var podmanConfig = registry.PodmanConfig() // ContainerToPodOptions takes the Container and Pod Create options, assigning the matching values back to podCreate for the purpose of the libpod API -// For this function to succeed, the JSON tags in PodCreateOptions and ContainerCreateOptions need to match due to the Marshaling and Unmarshaling done. -// The types of the options also need to match or else the unmarshaling will fail even if the tags match +// For this function to succeed, the JSON tags in PodCreateOptions and ContainerCreateOptions need to match due to the Marshalling and Unmarshalling done. +// The types of the options also need to match or else the unmarshalling will fail even if the tags match func ContainerToPodOptions(containerCreate *entities.ContainerCreateOptions, podCreate *entities.PodCreateOptions) error { contMarshal, err := json.Marshal(containerCreate) if err != nil { @@ -780,15 +780,15 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, ) _ = cmd.RegisterFlagCompletionFunc(pidFlagName, AutocompleteNamespace) - volumeDesciption := "Bind mount a volume into the container" + volumeDescription := "Bind mount a volume into the container" if registry.IsRemote() { - volumeDesciption = "Bind mount a volume into the container. Volume source will be on the server machine, not the client" + volumeDescription = "Bind mount a volume into the container. Volume source will be on the server machine, not the client" } volumeFlagName := "volume" createFlags.StringArrayVarP( &cf.Volume, volumeFlagName, "v", cf.Volume, - volumeDesciption, + volumeDescription, ) _ = cmd.RegisterFlagCompletionFunc(volumeFlagName, AutocompleteVolumeFlag) diff --git a/cmd/podman/kube/generate.go b/cmd/podman/kube/generate.go index 30b06b0c50..35a9c5710a 100644 --- a/cmd/podman/kube/generate.go +++ b/cmd/podman/kube/generate.go @@ -17,7 +17,7 @@ import ( var ( generateOptions = entities.GenerateKubeOptions{} generateFile = "" - generateDescription = `Command generates Kubernetes Pod, Service or PersistenVolumeClaim YAML (v1 specification) from Podman containers, pods or volumes. + generateDescription = `Command generates Kubernetes Pod, Service or PersistentVolumeClaim YAML (v1 specification) from Podman containers, pods or volumes. Whether the input is for a container or pod, Podman will always generate the specification as a pod.` diff --git a/cmd/quadlet/main.go b/cmd/quadlet/main.go index 35351bbde1..7f372f0d27 100644 --- a/cmd/quadlet/main.go +++ b/cmd/quadlet/main.go @@ -281,7 +281,7 @@ func isUnambiguousName(imageName string) bool { // // We implement a simple version of this from scratch here to avoid // a huge dependency in the generator just for a warning. -func warnIfAmbigiousName(container *parser.UnitFile) { +func warnIfAmbiguousName(container *parser.UnitFile) { imageName, ok := container.Lookup(quadlet.ContainerGroup, quadlet.KeyImage) if !ok { return @@ -347,7 +347,7 @@ func main() { switch { case strings.HasSuffix(name, ".container"): - warnIfAmbigiousName(unit) + warnIfAmbiguousName(unit) service, err = quadlet.ConvertContainer(unit, isUser) case strings.HasSuffix(name, ".volume"): service, err = quadlet.ConvertVolume(unit, name) diff --git a/contrib/cirrus/logformatter.t b/contrib/cirrus/logformatter.t index 4a57fad8dc..286802b0bf 100755 --- a/contrib/cirrus/logformatter.t +++ b/contrib/cirrus/logformatter.t @@ -297,7 +297,7 @@ $SCRIPT_BASE/integration_test.sh |& ${TIMESTAMP} [+0248s] test_list_container (compat.test_containers.TestContainers) ... ok [+0252s] test_mount_preexisting_dir (compat.test_containers.TestContainers) ... ok [+0253s] test_mount_rw_by_default (compat.test_containers.TestContainers) ... ok -[+0257s] test_non_existant_workdir (compat.test_containers.TestContainers) ... ok +[+0257s] test_non_existent_workdir (compat.test_containers.TestContainers) ... ok [+0258s] test_pause_container (compat.test_containers.TestContainers) ... ok [+0260s] test_pause_stopped_container (compat.test_containers.TestContainers) ... ok [+0261s] test_remove_container (compat.test_containers.TestContainers) ... ok @@ -366,7 +366,7 @@ $SCRIPT_BASE/integration_test.sh |& ${TIMESTAMP} [+0248s] test_list_container (compat.test_containers.TestContainers) ... ok [+0252s] test_mount_preexisting_dir (compat.test_containers.TestContainers) ... ok [+0253s] test_mount_rw_by_default (compat.test_containers.TestContainers) ... ok -[+0257s] test_non_existant_workdir (compat.test_containers.TestContainers) ... ok +[+0257s] test_non_existent_workdir (compat.test_containers.TestContainers) ... ok [+0258s] test_pause_container (compat.test_containers.TestContainers) ... ok [+0260s] test_pause_stopped_container (compat.test_containers.TestContainers) ... ok [+0261s] test_remove_container (compat.test_containers.TestContainers) ... ok diff --git a/contrib/cirrus/wsl-env-launch.ps1 b/contrib/cirrus/wsl-env-launch.ps1 index f41cec9866..b2a6158629 100644 --- a/contrib/cirrus/wsl-env-launch.ps1 +++ b/contrib/cirrus/wsl-env-launch.ps1 @@ -61,7 +61,7 @@ while ($ljob.HasMoreData) { } if ($pjob.State -eq 'Failed') { - Write-Output "Failure occured, see above. Extra info:" + Write-Output "Failure occurred, see above. Extra info:" Receive-Job $pjob throw "wsl task failed on us!" } diff --git a/docs/source/markdown/podman-network.1.md b/docs/source/markdown/podman-network.1.md index 5bcb1d1da8..f53f0a8862 100644 --- a/docs/source/markdown/podman-network.1.md +++ b/docs/source/markdown/podman-network.1.md @@ -33,7 +33,7 @@ so networks have to be created again after a backend change. | prune | [podman-network-prune(1)](podman-network-prune.1.md) | Remove all unused networks | | reload | [podman-network-reload(1)](podman-network-reload.1.md) | Reload network configuration for containers | | rm | [podman-network-rm(1)](podman-network-rm.1.md) | Remove one or more networks | -| update | [podman-network-upate(1)](podman-network-update.1.md) | Update an existing Podman network | +| update | [podman-network-update(1)](podman-network-update.1.md) | Update an existing Podman network | ## SEE ALSO **[podman(1)](podman.1.md)**, **[containers.conf(5)](https://github.com/containers/common/blob/main/docs/containers.conf.5.md)** diff --git a/docs/source/markdown/podman-systemd.unit.5.md b/docs/source/markdown/podman-systemd.unit.5.md index aa119a23f3..8cd4afc20e 100644 --- a/docs/source/markdown/podman-systemd.unit.5.md +++ b/docs/source/markdown/podman-systemd.unit.5.md @@ -590,7 +590,7 @@ Valid options for `[Volume]` are listed below: | ----------------- | ------------------ | | Device=tmpfs | --opt device=tmpfs | | Copy=true | --opt copy | -| Groupt=192 | --opt group=192 | +| Group=192 | --opt group=192 | | Label="foo=bar" | --label "foo=bar" | | Options=XYZ | --opt XYZ | diff --git a/docs/tutorials/qemu-remote-tutorial.md b/docs/tutorials/qemu-remote-tutorial.md index 94805f902d..64d4ee58f2 100644 --- a/docs/tutorials/qemu-remote-tutorial.md +++ b/docs/tutorials/qemu-remote-tutorial.md @@ -50,7 +50,7 @@ Generate ssh keys with an empty passphrase ssh-keygen -t ed25519 -f C:\qemu-remote\remote -### Ingition for FCOS +### Ignition for FCOS Create ignition file C:\qemu-remote\remote.ign with the content of ``` diff --git a/libpod/boltdb_state.go b/libpod/boltdb_state.go index a31f34bebb..db0a8833b3 100644 --- a/libpod/boltdb_state.go +++ b/libpod/boltdb_state.go @@ -72,7 +72,7 @@ type BoltState struct { // for the exit file to be written and another process removes it along with // the container during auto-removal. The same race would happen trying to // read the exit code from the containers bucket. Hence, exit codes go into -// their own bucket. To avoid the rather expensive JSON (un)marshaling, we +// their own bucket. To avoid the rather expensive JSON (un)marshalling, we // have two buckets: one for the exit codes, the other for the timestamps. // NewBoltState creates a new bolt-backed state database @@ -1383,7 +1383,7 @@ func (s *BoltState) AddContainerExitCode(id string, exitCode int32) error { rawExitCode := []byte(strconv.Itoa(int(exitCode))) rawTimeStamp, err := time.Now().MarshalText() if err != nil { - return fmt.Errorf("marshaling exit-code time stamp: %w", err) + return fmt.Errorf("marshalling exit-code time stamp: %w", err) } return db.Update(func(tx *bolt.Tx) error { diff --git a/libpod/options.go b/libpod/options.go index 556f30898b..e8ffd9a7bc 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -1911,7 +1911,7 @@ func WithInfraConfig(compatibleOptions InfraInherit) CtrCreateOption { err = json.Unmarshal(compatMarshal, ctr.config) if err != nil { - return errors.New("could not unmarshal compatible options into contrainer config") + return errors.New("could not unmarshal compatible options into container config") } return nil } diff --git a/pkg/api/server/register_networks.go b/pkg/api/server/register_networks.go index 96b51b6962..eb95e0d8cc 100644 --- a/pkg/api/server/register_networks.go +++ b/pkg/api/server/register_networks.go @@ -238,8 +238,8 @@ func (s *APIServer) registerNetworkHandlers(r *mux.Router) error { // --- // tags: // - networks - // summary: Update exisiting podman network - // description: Update exisiting podman network + // summary: Update existing podman network + // description: Update existing podman network // produces: // - application/json // parameters: diff --git a/pkg/bindings/errors.go b/pkg/bindings/errors.go index c1f1ed4639..039d2187b4 100644 --- a/pkg/bindings/errors.go +++ b/pkg/bindings/errors.go @@ -15,7 +15,7 @@ var ( func handleError(data []byte, unmarshalErrorInto interface{}) error { if err := json.Unmarshal(data, unmarshalErrorInto); err != nil { - return fmt.Errorf("unmarshaling error into %#v, data %q: %w", unmarshalErrorInto, string(data), err) + return fmt.Errorf("unmarshalling error into %#v, data %q: %w", unmarshalErrorInto, string(data), err) } return unmarshalErrorInto.(error) } @@ -36,7 +36,7 @@ func (h APIResponse) ProcessWithError(unmarshalInto interface{}, unmarshalErrorI if h.IsSuccess() || h.IsRedirection() { if unmarshalInto != nil { if err := json.Unmarshal(data, unmarshalInto); err != nil { - return fmt.Errorf("unmarshaling into %#v, data %q: %w", unmarshalInto, string(data), err) + return fmt.Errorf("unmarshalling into %#v, data %q: %w", unmarshalInto, string(data), err) } return nil } diff --git a/pkg/domain/utils/scp.go b/pkg/domain/utils/scp.go index 19567551e6..b89a3772e6 100644 --- a/pkg/domain/utils/scp.go +++ b/pkg/domain/utils/scp.go @@ -400,7 +400,7 @@ func RemoteArgLength(input string, side int) int { return -1 } -// GetSerivceInformation takes the parsed list of hosts to connect to and validates the information +// GetServiceInformation takes the parsed list of hosts to connect to and validates the information func GetServiceInformation(sshInfo *entities.ImageScpConnections, cliConnections []string, cfg *config.Config) (map[string]config.Destination, error) { var serv map[string]config.Destination var urlS string diff --git a/pkg/errorhandling/errorhandling.go b/pkg/errorhandling/errorhandling.go index 9b456c9c08..da39b04668 100644 --- a/pkg/errorhandling/errorhandling.go +++ b/pkg/errorhandling/errorhandling.go @@ -77,7 +77,7 @@ func CloseQuiet(f *os.File) { // Contains checks if err's message contains sub's message. Contains should be // used iff either err or sub has lost type information (e.g., due to -// marshaling). For typed errors, please use `errors.Contains(...)` or `Is()` +// marshalling). For typed errors, please use `errors.Contains(...)` or `Is()` // in recent version of Go. func Contains(err error, sub error) bool { return strings.Contains(err.Error(), sub.Error()) diff --git a/pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go b/pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go index f1f74ac4c2..57a177f94d 100644 --- a/pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go +++ b/pkg/k8s.io/apimachinery/pkg/api/resource/quantity.go @@ -29,7 +29,7 @@ import ( ) // Quantity is a fixed-point representation of a number. -// It provides convenient marshaling/unmarshaling in JSON and YAML, +// It provides convenient marshalling/unmarshalling in JSON and YAML, // in addition to String() and AsInt64() accessors. // // The serialization format is: diff --git a/pkg/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go b/pkg/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go index f95ba6eacf..b07eca0482 100644 --- a/pkg/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go +++ b/pkg/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go @@ -22,7 +22,7 @@ import ( ) // Duration is a wrapper around time.Duration which supports correct -// marshaling to YAML and JSON. In particular, it marshals into strings, which +// marshalling to YAML and JSON. In particular, it marshals into strings, which // can be used as map keys in json. type Duration struct { time.Duration diff --git a/pkg/k8s.io/apimachinery/pkg/apis/meta/v1/time.go b/pkg/k8s.io/apimachinery/pkg/apis/meta/v1/time.go index bdc55ab348..ae56d8c2b2 100644 --- a/pkg/k8s.io/apimachinery/pkg/apis/meta/v1/time.go +++ b/pkg/k8s.io/apimachinery/pkg/apis/meta/v1/time.go @@ -22,7 +22,7 @@ import ( ) // Time is a wrapper around time.Time which supports correct -// marshaling to YAML and JSON. Wrappers are provided for many +// marshalling to YAML and JSON. Wrappers are provided for many // of the factory methods that the time package offers. // // +protobuf.options.marshal=false diff --git a/pkg/machine/e2e/config_ssh_test.go b/pkg/machine/e2e/config_ssh_test.go index f062625fa6..317478e935 100644 --- a/pkg/machine/e2e/config_ssh_test.go +++ b/pkg/machine/e2e/config_ssh_test.go @@ -25,7 +25,7 @@ func (s *sshMachine) withUsername(name string) *sshMachine { //nolint:unused return s } -func (s *sshMachine) withSSHComand(sshCommand []string) *sshMachine { +func (s *sshMachine) withSSHCommand(sshCommand []string) *sshMachine { s.sshCommand = sshCommand return s } diff --git a/pkg/machine/e2e/init_test.go b/pkg/machine/e2e/init_test.go index 5629e76528..932924ea90 100644 --- a/pkg/machine/e2e/init_test.go +++ b/pkg/machine/e2e/init_test.go @@ -109,19 +109,19 @@ var _ = Describe("podman machine init", func() { Expect(startSession).To(Exit(0)) sshCPU := sshMachine{} - CPUsession, err := mb.setName(name).setCmd(sshCPU.withSSHComand([]string{"lscpu", "|", "grep", "\"CPU(s):\"", "|", "head", "-1"})).run() + CPUsession, err := mb.setName(name).setCmd(sshCPU.withSSHCommand([]string{"lscpu", "|", "grep", "\"CPU(s):\"", "|", "head", "-1"})).run() Expect(err).ToNot(HaveOccurred()) Expect(CPUsession).To(Exit(0)) Expect(CPUsession.outputToString()).To(ContainSubstring("2")) sshDisk := sshMachine{} - diskSession, err := mb.setName(name).setCmd(sshDisk.withSSHComand([]string{"sudo", "fdisk", "-l", "|", "grep", "Disk"})).run() + diskSession, err := mb.setName(name).setCmd(sshDisk.withSSHCommand([]string{"sudo", "fdisk", "-l", "|", "grep", "Disk"})).run() Expect(err).ToNot(HaveOccurred()) Expect(diskSession).To(Exit(0)) Expect(diskSession.outputToString()).To(ContainSubstring("102 GiB")) sshMemory := sshMachine{} - memorySession, err := mb.setName(name).setCmd(sshMemory.withSSHComand([]string{"cat", "/proc/meminfo", "|", "grep", "-i", "'memtotal'", "|", "grep", "-o", "'[[:digit:]]*'"})).run() + memorySession, err := mb.setName(name).setCmd(sshMemory.withSSHCommand([]string{"cat", "/proc/meminfo", "|", "grep", "-i", "'memtotal'", "|", "grep", "-o", "'[[:digit:]]*'"})).run() Expect(err).ToNot(HaveOccurred()) Expect(memorySession).To(Exit(0)) foundMemory, err := strconv.Atoi(memorySession.outputToString()) @@ -130,7 +130,7 @@ var _ = Describe("podman machine init", func() { Expect(foundMemory).To(BeNumerically("<", 4200000)) sshTimezone := sshMachine{} - timezoneSession, err := mb.setName(name).setCmd(sshTimezone.withSSHComand([]string{"date"})).run() + timezoneSession, err := mb.setName(name).setCmd(sshTimezone.withSSHCommand([]string{"date"})).run() Expect(err).ToNot(HaveOccurred()) Expect(timezoneSession).To(Exit(0)) Expect(timezoneSession.outputToString()).To(ContainSubstring("HST")) @@ -156,7 +156,7 @@ var _ = Describe("podman machine init", func() { Expect(startSession).To(Exit(0)) ssh2 := sshMachine{} - sshSession2, err := mb.setName(name).setCmd(ssh2.withSSHComand([]string{"ls /testmountdir"})).run() + sshSession2, err := mb.setName(name).setCmd(ssh2.withSSHCommand([]string{"ls /testmountdir"})).run() Expect(err).ToNot(HaveOccurred()) Expect(sshSession2).To(Exit(0)) Expect(sshSession2.outputToString()).To(ContainSubstring("example")) diff --git a/pkg/machine/e2e/set_test.go b/pkg/machine/e2e/set_test.go index 690f00eb04..148e093b03 100644 --- a/pkg/machine/e2e/set_test.go +++ b/pkg/machine/e2e/set_test.go @@ -44,19 +44,19 @@ var _ = Describe("podman machine set", func() { Expect(startSession).To(Exit(0)) sshCPU := sshMachine{} - CPUsession, err := mb.setName(name).setCmd(sshCPU.withSSHComand([]string{"lscpu", "|", "grep", "\"CPU(s):\"", "|", "head", "-1"})).run() + CPUsession, err := mb.setName(name).setCmd(sshCPU.withSSHCommand([]string{"lscpu", "|", "grep", "\"CPU(s):\"", "|", "head", "-1"})).run() Expect(err).ToNot(HaveOccurred()) Expect(CPUsession).To(Exit(0)) Expect(CPUsession.outputToString()).To(ContainSubstring("2")) sshDisk := sshMachine{} - diskSession, err := mb.setName(name).setCmd(sshDisk.withSSHComand([]string{"sudo", "fdisk", "-l", "|", "grep", "Disk"})).run() + diskSession, err := mb.setName(name).setCmd(sshDisk.withSSHCommand([]string{"sudo", "fdisk", "-l", "|", "grep", "Disk"})).run() Expect(err).ToNot(HaveOccurred()) Expect(diskSession).To(Exit(0)) Expect(diskSession.outputToString()).To(ContainSubstring("102 GiB")) sshMemory := sshMachine{} - memorySession, err := mb.setName(name).setCmd(sshMemory.withSSHComand([]string{"cat", "/proc/meminfo", "|", "grep", "-i", "'memtotal'", "|", "grep", "-o", "'[[:digit:]]*'"})).run() + memorySession, err := mb.setName(name).setCmd(sshMemory.withSSHCommand([]string{"cat", "/proc/meminfo", "|", "grep", "-i", "'memtotal'", "|", "grep", "-o", "'[[:digit:]]*'"})).run() Expect(err).ToNot(HaveOccurred()) Expect(memorySession).To(Exit(0)) foundMemory, err := strconv.Atoi(memorySession.outputToString()) @@ -88,13 +88,13 @@ var _ = Describe("podman machine set", func() { Expect(startSession).To(Exit(0)) ssh2 := sshMachine{} - sshSession2, err := mb.setName(name).setCmd(ssh2.withSSHComand([]string{"lscpu", "|", "grep", "\"CPU(s):\"", "|", "head", "-1"})).run() + sshSession2, err := mb.setName(name).setCmd(ssh2.withSSHCommand([]string{"lscpu", "|", "grep", "\"CPU(s):\"", "|", "head", "-1"})).run() Expect(err).ToNot(HaveOccurred()) Expect(sshSession2).To(Exit(0)) Expect(sshSession2.outputToString()).To(ContainSubstring("1")) ssh3 := sshMachine{} - sshSession3, err := mb.setName(name).setCmd(ssh3.withSSHComand([]string{"sudo", "fdisk", "-l", "|", "grep", "Disk"})).run() + sshSession3, err := mb.setName(name).setCmd(ssh3.withSSHCommand([]string{"sudo", "fdisk", "-l", "|", "grep", "Disk"})).run() Expect(err).ToNot(HaveOccurred()) Expect(sshSession3).To(Exit(0)) Expect(sshSession3.outputToString()).To(ContainSubstring("100 GiB")) diff --git a/pkg/machine/e2e/ssh_test.go b/pkg/machine/e2e/ssh_test.go index 13028e15e8..5cffdabf2c 100644 --- a/pkg/machine/e2e/ssh_test.go +++ b/pkg/machine/e2e/ssh_test.go @@ -50,13 +50,13 @@ var _ = Describe("podman machine ssh", func() { Expect(session).To(Exit(0)) ssh := sshMachine{} - sshSession, err := mb.setName(name).setCmd(ssh.withSSHComand([]string{"cat", "/etc/os-release"})).run() + sshSession, err := mb.setName(name).setCmd(ssh.withSSHCommand([]string{"cat", "/etc/os-release"})).run() Expect(err).ToNot(HaveOccurred()) Expect(sshSession).To(Exit(0)) Expect(sshSession.outputToString()).To(ContainSubstring("Fedora CoreOS")) // keep exit code - sshSession, err = mb.setName(name).setCmd(ssh.withSSHComand([]string{"false"})).run() + sshSession, err = mb.setName(name).setCmd(ssh.withSSHCommand([]string{"false"})).run() Expect(err).ToNot(HaveOccurred()) Expect(sshSession).To(Exit(1)) Expect(sshSession.outputToString()).To(Equal("")) diff --git a/pkg/specgen/generate/container.go b/pkg/specgen/generate/container.go index 3cc628d2e0..1570fe5037 100644 --- a/pkg/specgen/generate/container.go +++ b/pkg/specgen/generate/container.go @@ -307,8 +307,8 @@ func CompleteSpec(ctx context.Context, r *libpod.Runtime, s *specgen.SpecGenerat } // ConfigToSpec takes a completed container config and converts it back into a specgenerator for purposes of cloning an existing container -func ConfigToSpec(rt *libpod.Runtime, specg *specgen.SpecGenerator, contaierID string) (*libpod.Container, *libpod.InfraInherit, error) { - c, err := rt.LookupContainer(contaierID) +func ConfigToSpec(rt *libpod.Runtime, specg *specgen.SpecGenerator, containerID string) (*libpod.Container, *libpod.InfraInherit, error) { + c, err := rt.LookupContainer(containerID) if err != nil { return nil, nil, err } diff --git a/pkg/specgen/generate/oci_linux.go b/pkg/specgen/generate/oci_linux.go index 5be10f5aa2..2a1afbecc4 100644 --- a/pkg/specgen/generate/oci_linux.go +++ b/pkg/specgen/generate/oci_linux.go @@ -47,7 +47,7 @@ func canMountSys(isRootless, isNewUserns bool, s *specgen.SpecGenerator) bool { return true } -func getCgroupPermissons(unmask []string) string { +func getCgroupPermissions(unmask []string) string { ro := "ro" rw := "rw" cgroup := "/sys/fs/cgroup" @@ -71,7 +71,7 @@ func getCgroupPermissons(unmask []string) string { // SpecGenToOCI returns the base configuration for the container. func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runtime, rtc *config.Config, newImage *libimage.Image, mounts []spec.Mount, pod *libpod.Pod, finalCmd []string, compatibleOptions *libpod.InfraInherit) (*spec.Spec, error) { - cgroupPerm := getCgroupPermissons(s.Unmask) + cgroupPerm := getCgroupPermissions(s.Unmask) g, err := generate.New("linux") if err != nil { diff --git a/pkg/util/camelcase/README.md b/pkg/util/camelcase/README.md index ab0da573a7..f553487ebb 100644 --- a/pkg/util/camelcase/README.md +++ b/pkg/util/camelcase/README.md @@ -27,9 +27,9 @@ go get github.com/fatih/camelcase ## Usage and examples ```go -splitted := camelcase.Split("GolangPackage") +split := camelcase.Split("GolangPackage") -fmt.Println(splitted[0], splitted[1]) // prints: "Golang", "Package" +fmt.Println(split[0], split[1]) // prints: "Golang", "Package" ``` Both lower camel case and upper camel case are supported. For more info please diff --git a/test/python/docker/compat/test_containers.py b/test/python/docker/compat/test_containers.py index f9d4c186ea..0f64436107 100644 --- a/test/python/docker/compat/test_containers.py +++ b/test/python/docker/compat/test_containers.py @@ -220,7 +220,7 @@ class TestContainers(common.DockerTestCase): _, out = ctr.exec_run(["stat", "-c", "%u:%g", "/workspace"]) self.assertEqual(out.rstrip(), b"1042:1043", "UID/GID set in dockerfile") - def test_non_existant_workdir(self): + def test_non_existent_workdir(self): dockerfile = ( b"FROM quay.io/libpod/alpine:latest\n" b"USER root\n" @@ -233,7 +233,7 @@ class TestContainers(common.DockerTestCase): image=img.id, detach=True, command="top", - volumes=["test_non_existant_workdir:/workspace"], + volumes=["test_non_existent_workdir:/workspace"], ) ctr.start() ret, _ = ctr.exec_run(["stat", "/workspace/scratch/test"])