Skip to content

Commit

Permalink
Fix typos (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Jul 13, 2020
1 parent 506c1b1 commit 03c3c82
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ On macOS, you can install `hcloud` via [Homebrew](https://brew.sh/):

### Third-party packages

There are inofficial packages maintained by third-party users. Please note
There are unofficial packages maintained by third-party users. Please note
that these packages aren’t supported nor maintained by Hetzner Cloud and
may not always be up-to-date. Downloading the binary or building from source
is still the recommended install method.
Expand Down
6 changes: 3 additions & 3 deletions cli/certificate_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"github.com/spf13/cobra"
)

var certficateTableOutput *tableOutput
var certificateTableOutput *tableOutput

func init() {
certficateTableOutput = describeCertificatesTableOutput()
certificateTableOutput = describeCertificatesTableOutput()
}

func newCertificatesListCommand(cli *CLI) *cobra.Command {
Expand All @@ -20,7 +20,7 @@ func newCertificatesListCommand(cli *CLI) *cobra.Command {
Short: "List Certificates",
Long: listLongDescription(
"Displays a list of certificates",
certficateTableOutput.Columns(),
certificateTableOutput.Columns(),
),
TraverseChildren: true,
DisableFlagsInUseLine: true,
Expand Down
2 changes: 1 addition & 1 deletion cli/certificate_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func newCertificateUpdateCommand(cli *CLI) *cobra.Command {
cmd := &cobra.Command{
Use: "update [FLAGS] CERTFICATE",
Use: "update [FLAGS] CERTIFICATE",
Short: "Update an existing Certificate",
Args: cobra.ExactArgs(1),
TraverseChildren: true,
Expand Down
10 changes: 5 additions & 5 deletions cli/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (o *tableOutput) AddFieldOutputFn(field string, fn fieldOutputFn) *tableOut
return o
}

// AddAllowedFields reads all first level fieldnames of the struct and allowes them to be used.
// AddAllowedFields reads all first level fieldnames of the struct and allows them to be used.
func (o *tableOutput) AddAllowedFields(obj interface{}) *tableOutput {
v := reflect.ValueOf(obj)
if v.Kind() != reflect.Struct {
Expand Down Expand Up @@ -229,9 +229,9 @@ func (o *tableOutput) ValidateColumns(cols []string) error {
}

// WriteHeader writes the table header.
func (o *tableOutput) WriteHeader(collumns []string) {
func (o *tableOutput) WriteHeader(columns []string) {
var header []string
for _, col := range collumns {
for _, col := range columns {
if alias, ok := o.fieldAlias[col]; ok {
col = alias
}
Expand All @@ -245,15 +245,15 @@ func (o *tableOutput) Flush() error {
}

// Write writes a table line.
func (o *tableOutput) Write(collumns []string, obj interface{}) {
func (o *tableOutput) Write(columns []string, obj interface{}) {
data := structs.Map(obj)
dataL := map[string]interface{}{}
for key, value := range data {
dataL[strings.ToLower(key)] = value
}

var out []string
for _, col := range collumns {
for _, col := range columns {
colName := strings.ToLower(col)
if alias, ok := o.fieldAlias[colName]; ok {
if fn, ok := o.fieldMapping[alias]; ok {
Expand Down

0 comments on commit 03c3c82

Please sign in to comment.