github.com/segakazzz/buffalo@v0.16.22-0.20210119082501-1f52048d3feb/plugins/plugdeps/command.go (about)

     1  package plugdeps
     2  
     3  import "encoding/json"
     4  
     5  // Command is the plugin command you want to control further
     6  type Command struct {
     7  	Name     string    `toml:"name" json:"name"`
     8  	Flags    []string  `toml:"flags,omitempty" json:"flags,omitempty"`
     9  	Commands []Command `toml:"command,omitempty" json:"commands,omitempty"`
    10  }
    11  
    12  // String implementation of fmt.Stringer
    13  func (p Command) String() string {
    14  	b, _ := json.Marshal(p)
    15  	return string(b)
    16  }