From 0958ad982913ff24ab69f330cf60e3f069068498 Mon Sep 17 00:00:00 2001 From: Christian Ege Date: Sat, 13 Apr 2024 18:59:45 +0200 Subject: [PATCH] fix: typos in code comments and command descriptions --- cmd/ovp8xx/cmd/factoryReset.go | 2 +- cmd/ovp8xx/cmd/get.go | 4 ++-- cmd/ovp8xx/cmd/getSchema.go | 4 ++-- cmd/ovp8xx/cmd/getinit.go | 2 +- cmd/ovp8xx/cmd/pcic.go | 2 +- cmd/ovp8xx/cmd/saveinit.go | 6 +++--- cmd/ovp8xx/cmd/waitforonline.go | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cmd/ovp8xx/cmd/factoryReset.go b/cmd/ovp8xx/cmd/factoryReset.go index e773fb5..189db54 100644 --- a/cmd/ovp8xx/cmd/factoryReset.go +++ b/cmd/ovp8xx/cmd/factoryReset.go @@ -14,7 +14,7 @@ var factoryResetCmd = &cobra.Command{ Short: "Performs a factory reset of the device", Long: `Sometime one wants a fresh start. -The command factoryReset resets all settings to their defaults and erases any addtional data like Docker containers.`, +The command factoryReset resets all settings to their defaults and erases any additional data like Docker containers.`, RunE: func(cmd *cobra.Command, args []string) error { keepNetworkSettings, err := cmd.Flags().GetBool("keepnetworksettings") if err != nil { diff --git a/cmd/ovp8xx/cmd/get.go b/cmd/ovp8xx/cmd/get.go index fc4d7cf..6cb2728 100644 --- a/cmd/ovp8xx/cmd/get.go +++ b/cmd/ovp8xx/cmd/get.go @@ -40,11 +40,11 @@ Valid queries are for example: - To query all ports including all sub elements the query "/ports" can be used. In contrast to the concept of a JSON pointer the OVP8xx does not response with the data -the pointer is pointing to, it returns the full object hirachie with the encapsulating +the pointer is pointing to, it returns the full object hierarchy with the encapsulating object paths. A query of the name of the "port6" (/ports/port6/info/name) not just returns the object of that port, -it also keeps the hirachy intact: +it also keeps the hierarchy intact: { "ports": diff --git a/cmd/ovp8xx/cmd/getSchema.go b/cmd/ovp8xx/cmd/getSchema.go index 0baa643..f19da9a 100644 --- a/cmd/ovp8xx/cmd/getSchema.go +++ b/cmd/ovp8xx/cmd/getSchema.go @@ -34,7 +34,7 @@ var getSchemaCmd = &cobra.Command{ Use: "getSchema", Short: "Retrieve the currently used JSON schema from the device", Long: `The OVP8xx getSchema command accepts a list of JSON pointers. -The JSON schema provides details about multiple aspects of a paramter. It +The JSON schema provides details about multiple aspects of a parameter. It contains information like the type of a parameter and its defaults. It also provides information weather a parameter is readOnly or not. @@ -76,7 +76,7 @@ The pointer '/device/swVersion/diagnostics' for example provides this informatio "type": "object" } -When no query is provided the complete schema is returend. +When no query is provided the complete schema is returned. `, RunE: getSchemaCommand, } diff --git a/cmd/ovp8xx/cmd/getinit.go b/cmd/ovp8xx/cmd/getinit.go index 08b7238..1a11477 100644 --- a/cmd/ovp8xx/cmd/getinit.go +++ b/cmd/ovp8xx/cmd/getinit.go @@ -36,7 +36,7 @@ var getInitCmd = &cobra.Command{ Long: `The OVP8xx provides a way to store a configuration on the device NOTE: This shall be used with care, because it may lead to an system which is no -longer useable when the expectation from the safed configuration is no longer met.`, +longer useable when the expectation from the saved configuration is no longer met.`, RunE: getInitCommand, } diff --git a/cmd/ovp8xx/cmd/pcic.go b/cmd/ovp8xx/cmd/pcic.go index e427a31..5c0b6d7 100644 --- a/cmd/ovp8xx/cmd/pcic.go +++ b/cmd/ovp8xx/cmd/pcic.go @@ -22,7 +22,7 @@ type PCICReceiver struct { // It takes a pcic.Frame as a parameter. func (r *PCICReceiver) Result(frame pcic.Frame) { r.frame = frame - fmt.Printf("Framecount: %d\n", r.framecount) + fmt.Printf("Frame count: %d\n", r.framecount) r.framecount++ } diff --git a/cmd/ovp8xx/cmd/saveinit.go b/cmd/ovp8xx/cmd/saveinit.go index d46667d..4f0366d 100644 --- a/cmd/ovp8xx/cmd/saveinit.go +++ b/cmd/ovp8xx/cmd/saveinit.go @@ -12,11 +12,11 @@ import ( var saveInitCmd = &cobra.Command{ Use: "saveInit", Short: "Saves the init configuration on the device", - Long: `To store the configuration persistant on the device the command saveInit can be used. + Long: `To store the configuration persistent on the device the command saveInit can be used. -A safed configuration persists a reboot. This is best used in combination with the "set" command. +A saved configuration persists a reboot. This is best used in combination with the "set" command. -Please use this with care. The scope should be as narrow as posible, to prevent any conflicts. +Please use this with care. The scope should be as narrow as possible, to prevent any conflicts. In case no JSON Pointer is provided the complete configuration is saved`, RunE: func(cmd *cobra.Command, args []string) error { pointers, err := cmd.Flags().GetStringSlice("pointer") diff --git a/cmd/ovp8xx/cmd/waitforonline.go b/cmd/ovp8xx/cmd/waitforonline.go index 61c8e7b..7fb832e 100644 --- a/cmd/ovp8xx/cmd/waitforonline.go +++ b/cmd/ovp8xx/cmd/waitforonline.go @@ -41,7 +41,7 @@ func waitForOnlineCommand(cmd *cobra.Command, args []string) error { var waitForOnlineCmd = &cobra.Command{ Use: "WaitForOnline", Short: "Wait until the device is accessible", - Long: `This command is maybe useful after a reboot or power on. + Long: `This command is maybe useful after a reboot or power on. It can be used to wait until the device can handle requests`, RunE: waitForOnlineCommand, }