Skip to content

Commit

Permalink
chore: update some comments, fix error on _examples/serveman/commands.go
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Aug 30, 2022
1 parent bee57cb commit 687c184
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions _examples/serveman/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import (
"github.com/gookit/gcli/v3"
)

// Config struct
type Config struct {
// will exec command. eg. "go run main.go"
// will exec command. eg: "go run main.go"
Cmd string `json:"cmd"`
// serve name for will exec command
Name string `json:"name"`
Expand All @@ -23,7 +24,7 @@ type Config struct {
}

var (
config = New(Config)
config = new(Config)
// config file
confFile string
)
Expand Down
2 changes: 1 addition & 1 deletion base.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (c core) innerHelpVars() map[string]string {
}

// simple map[string]interface{} struct
// TODO use structs.MapDataStore
// TODO use structs.DataStore
type mapData struct {
data map[string]interface{}
}
Expand Down
8 changes: 4 additions & 4 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ func parseNamedRule(name, rule string) (mp map[string]string) {

// struct tag value use simple rule. each item split by ';'
//
// format: "desc;required;default;shorts"
// - format: "desc;required;default;shorts"
//
// eg:
//
// "int option message;required;i"
// "int option message;;a,b"
// "int option message;;a,b;23"
// "int option message;required;i"
// "int option message;;a,b"
// "int option message;;a,b;23"
//
// returns field name:
//
Expand Down

0 comments on commit 687c184

Please sign in to comment.