Fix typos

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 <erik.sjolund@gmail.com>
This commit is contained in:
Erik Sjölund 2023-02-11 11:16:37 +01:00
parent f099c1fc9a
commit a5ca732256
25 changed files with 47 additions and 47 deletions

View file

@ -17,8 +17,8 @@ const sizeWithUnitFormat = "(format: `<number>[<unit>]`, 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)

View file

@ -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.`

View file

@ -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)

View file

@ -297,7 +297,7 @@ $SCRIPT_BASE/integration_test.sh |&amp; ${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 |&amp; ${TIMESTAMP}
<span class="timestamp">[+0248s] </span><span class='bats-passed'>test_list_container (compat.test_containers.TestContainers) ... ok</span>
<span class="timestamp">[+0252s] </span><span class='bats-passed'>test_mount_preexisting_dir (compat.test_containers.TestContainers) ... ok</span>
<span class="timestamp">[+0253s] </span><span class='bats-passed'>test_mount_rw_by_default (compat.test_containers.TestContainers) ... ok</span>
<span class="timestamp">[+0257s] </span><span class='bats-passed'>test_non_existant_workdir (compat.test_containers.TestContainers) ... ok</span>
<span class="timestamp">[+0257s] </span><span class='bats-passed'>test_non_existent_workdir (compat.test_containers.TestContainers) ... ok</span>
<span class="timestamp">[+0258s] </span><span class='bats-passed'>test_pause_container (compat.test_containers.TestContainers) ... ok</span>
<span class="timestamp">[+0260s] </span><span class='bats-passed'>test_pause_stopped_container (compat.test_containers.TestContainers) ... ok</span>
<span class="timestamp">[+0261s] </span><span class='bats-passed'>test_remove_container (compat.test_containers.TestContainers) ... ok</span>

View file

@ -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!"
}

View file

@ -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)**

View file

@ -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 |

View file

@ -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
```

View file

@ -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 {

View file

@ -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
}

View file

@ -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:

View file

@ -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
}

View file

@ -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

View file

@ -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())

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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
}

View file

@ -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"))

View file

@ -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"))

View file

@ -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(""))

View file

@ -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
}

View file

@ -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 {

View file

@ -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

View file

@ -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"])