diff --git a/commands/droplets.go b/commands/droplets.go index e270d7bed..7725b4258 100644 --- a/commands/droplets.go +++ b/commands/droplets.go @@ -318,9 +318,8 @@ func RunDropletCreate(c *CmdConfig) error { return err } } - c.Display(item) - return nil + return c.Display(item) } // RunDropletTag adds a tag to a droplet. diff --git a/commands/firewalls.go b/commands/firewalls.go index b69911794..416f076a1 100644 --- a/commands/firewalls.go +++ b/commands/firewalls.go @@ -415,7 +415,10 @@ func extractInboundRules(s string) (rules []godo.InboundRule, err error) { } mr, _ := json.Marshal(rule) ir := &godo.InboundRule{} - json.Unmarshal(mr, ir) + err = json.Unmarshal(mr, ir) + if err != nil { + return nil, err + } rules = append(rules, *ir) } @@ -435,7 +438,10 @@ func extractOutboundRules(s string) (rules []godo.OutboundRule, err error) { } mr, _ := json.Marshal(rule) or := &godo.OutboundRule{} - json.Unmarshal(mr, or) + err = json.Unmarshal(mr, or) + if err != nil { + return nil, err + } rules = append(rules, *or) } diff --git a/commands/registry.go b/commands/registry.go index b436f4020..91b6c7718 100644 --- a/commands/registry.go +++ b/commands/registry.go @@ -386,7 +386,10 @@ func RunRegistryLogin(c *CmdConfig) error { return err } - cf.Save() + err = cf.Save() + if err != nil { + return err + } } return nil diff --git a/scripts/gen-yaml-docs.go b/scripts/gen-yaml-docs.go index b1858f2a4..bc3a5775e 100644 --- a/scripts/gen-yaml-docs.go +++ b/scripts/gen-yaml-docs.go @@ -65,7 +65,10 @@ func writeDocs(cmd *cobra.Command, dir string) error { defer f.Close() // Call Cobra's GenYaml command, passing in the created file - doc.GenYaml(cmd, f) + err = doc.GenYaml(cmd, f) + if err != nil { + return err + } // Append alias information to the standard YAML output aliases := fmt.Sprintf("aliases: %s\n", strings.Join(cmd.Aliases, ", "))