Skip to content

Commit

Permalink
module yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Lack30 committed Apr 12, 2024
1 parent 1fc1342 commit a903978
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
26 changes: 13 additions & 13 deletions module/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,19 @@ type RunContext struct {
type RunE func(ctx *RunContext, options ...client.ExecOption) ([]byte, error)

type Command struct {
Name string `json:"name" yaml:"name"`
Alias string `json:"alias" yaml:"alias"`
Long string `json:"long" yaml:"long"`
Script string `json:"script" yaml:"script"`
Authors []string `json:"authors" yaml:"authors"`
Version string `json:"version" yaml:"version"`
Example string `json:"example" yaml:"example"`
Params []*Schema `json:"params" yaml:"params"`
Returns []*Schema `json:"returns" yaml:"returns"`
Commands []*Command `json:"commands" yaml:"commands"`
Mutable bool `json:"mutable" yaml:"mutable"`
Hide bool `json:"hide" yaml:"hide"`
Root string `json:"root" yaml:"root"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Alias string `json:"alias,omitempty" yaml:"alias,omitempty"`
Long string `json:"long,omitempty" yaml:"long,omitempty"`
Script string `json:"script,omitempty" yaml:"script,omitempty"`
Authors []string `json:"authors,omitempty" yaml:"authors,omitempty"`
Version string `json:"version,omitempty" yaml:"version,omitempty"`
Example string `json:"example,omitempty" yaml:"example,omitempty"`
Params []*Schema `json:"params,omitempty" yaml:"params,omitempty"`
Returns []*Schema `json:"returns,omitempty" yaml:"returns,omitempty"`
Commands []*Command `json:"commands,omitempty" yaml:"commands,omitempty"`
Mutable bool `json:"mutable,omitempty" yaml:"mutable,omitempty"`
Hide bool `json:"hide,omitempty" yaml:"hide,omitempty"`
Root string `json:"root,omitempty" yaml:"root,omitempty"`
cobra *cobra.Command `yaml:"-"`

PreRun RunE `json:"-" yaml:"-"`
Expand Down
12 changes: 6 additions & 6 deletions module/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import (
)

type Schema struct {
Name string `json:"name" yaml:"name"`
Type string `json:"type" yaml:"type"`
Short string `json:"short" yaml:"short"`
Desc string `json:"desc" yaml:"desc"`
Default string `json:"default" yaml:"default"`
Example string `json:"example" yaml:"example"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Type string `json:"type,omitempty" yaml:"type,omitempty"`
Short string `json:"short,omitempty" yaml:"short,omitempty"`
Desc string `json:"desc,omitempty" yaml:"desc,omitempty"`
Default string `json:"default,omitempty" yaml:"default,omitempty"`
Example string `json:"example,omitempty" yaml:"example,omitempty"`
Value *SchemaValue `json:"-" yaml:"-"`
}

Expand Down

0 comments on commit a903978

Please sign in to comment.