Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
Add comments to fix lint messages
Browse files Browse the repository at this point in the history
  • Loading branch information
artmello committed Jul 25, 2018
1 parent 4a84457 commit f4d3cfb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/svcat/class/create_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/spf13/cobra"
)

// CreateCmd contains the information needed to create a new class
type CreateCmd struct {
*command.Context
Name string
Expand All @@ -50,6 +51,7 @@ func NewCreateCmd(cxt *command.Context) *cobra.Command {
return cmd
}

// Validate checks that the required arguments have been provided
func (c *CreateCmd) Validate(args []string) error {
if len(args) <= 0 {
return fmt.Errorf("new class name should be provided")
Expand All @@ -60,6 +62,7 @@ func (c *CreateCmd) Validate(args []string) error {
return nil
}

// Calls out to the pkg lib to create the class and displays the output
func (c *CreateCmd) Run() error {
class, err := c.App.RetrieveClassByName(c.From)
if err != nil {
Expand Down

0 comments on commit f4d3cfb

Please sign in to comment.