diff --git a/pkg/inventory/command.go b/pkg/inventory/command.go index fbfe8ad92..7b4546b93 100644 --- a/pkg/inventory/command.go +++ b/pkg/inventory/command.go @@ -47,7 +47,7 @@ type CommandOptions struct { Inventory ifc.Inventory } -// ListHostsCommand is used to store common variables from cmd flags for list-hots command +// ListHostsCommand is used to store common variables from cmd flags for list-hosts command type ListHostsCommand struct { Writer io.Writer Options *CommandOptions @@ -83,7 +83,7 @@ func (o *CommandOptions) validateSingleHostAction() error { return nil } -//RunE method returns list of hots from BaremetalInventory +//RunE method returns list of hosts from BaremetalInventory func (l *ListHostsCommand) RunE() error { if l.OutputFormat != TableOutputFormat && l.OutputFormat != YamlOutputFormat { return ErrInvalidOptions{Message: "output formats. Supported options are 'table' and 'yaml'"} @@ -94,7 +94,7 @@ func (l *ListHostsCommand) RunE() error { return err } if len(hostClients) == 0 { - return fmt.Errorf("No hosts present in the hostInventory") + return fmt.Errorf("no hosts present in the hostInventory") } return l.Write(hostClients) } diff --git a/pkg/inventory/command_test.go b/pkg/inventory/command_test.go index 29c57e1b3..cf67b9760 100644 --- a/pkg/inventory/command_test.go +++ b/pkg/inventory/command_test.go @@ -68,7 +68,7 @@ func TestListHostsCommand(t *testing.T) { }) t.Run("error ListHosts", func(t *testing.T) { - expectedErr := fmt.Errorf("No hosts present in the hostInventory") + expectedErr := fmt.Errorf("no hosts present in the hostInventory") var hosts []remoteifc.Client bmhInv := &mockinventory.MockBMHInventory{} diff --git a/pkg/inventory/errors.go b/pkg/inventory/errors.go index dd66ed4b8..e5917a079 100644 --- a/pkg/inventory/errors.go +++ b/pkg/inventory/errors.go @@ -16,7 +16,7 @@ package inventory import "fmt" -// ErrInvalidOptions is returned when incompetible flags are +// ErrInvalidOptions is returned when incompatible flags are type ErrInvalidOptions struct { Message string } diff --git a/pkg/inventory/ifc/interface.go b/pkg/inventory/ifc/interface.go index bfa0e94a9..6a59eff30 100644 --- a/pkg/inventory/ifc/interface.go +++ b/pkg/inventory/ifc/interface.go @@ -49,6 +49,6 @@ const ( ) // BaremetalBatchRunOptions are options to be passed to RunOperation, this is to be -// exetended in the future, to support such things as concurency +// extended in the future, to support such things as concurency type BaremetalBatchRunOptions struct { } diff --git a/pkg/inventory/ifc/selectors.go b/pkg/inventory/ifc/selectors.go index e10755e04..cf08005d8 100644 --- a/pkg/inventory/ifc/selectors.go +++ b/pkg/inventory/ifc/selectors.go @@ -15,7 +15,7 @@ package ifc // BaremetalHostSelector allows to select baremetal hosts, if used empty all possible hosts -// will be should be returned by Select() method of BaremetalInvenotry interface +// will be should be returned by Select() method of BaremetalInventory interface type BaremetalHostSelector struct { Name string Namespace string