Skip to content

Commit

Permalink
up: update some docs and update some helper funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Sep 29, 2022
1 parent 7fe4634 commit 7a02863
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
3 changes: 3 additions & 0 deletions events/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ const (
OnAppInitBefore = "app.init.before"
// OnAppInitAfter On app inited
OnAppInitAfter = "app.init.after"
// OnAppInit event
// Deprecated: please use OnAppInitAfter
OnAppInit = OnAppInitAfter
// OnAppStop = "app.stopped"

OnAppBindOptsBefore = "app.bind.opts.before"
Expand Down
1 change: 1 addition & 0 deletions helper/clog.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package helper
2 changes: 1 addition & 1 deletion helper/help_vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const HelpVarFormat = "{$%s}"
type HelpVars struct {
VarOpen, VarClose string

// Vars you can add some vars map for render help info
// Vars you can add some vars map for render help info. TODO rename replaces/pairs
Vars map[string]string
}

Expand Down
10 changes: 6 additions & 4 deletions resource/Changelog-TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@

## TODO

- hook on set flag value
- [ ] hook on set flag value
- [x] option support multi shorts names
- [ ] cmd support flag option category
- [ ] app support command category by `c.Category`
- [ ] print parent's options on subcommand help panel
- [ ] prompt completion by readline
- [ ] keyboard and cursor control
- [ ] keyboard and cursor control on terminal
- [ ] refactor gflag.Flags, remove dep the `flag.FlagSet`
- [ ] collect option/argument value by interactive `Option.Question`
- [ ] support all command docs to markdown

refers:
readline refers:

- https://github.com/chzyer/readline/tree/master/example
- https://github.com/abiosoft/ishell/blob/master/completer.go
Expand All @@ -19,7 +22,6 @@ refers:

**new**

- [ ] support all command docs to markdown
- [x] add some special flag type vars
- [x] support hidden command on render help by `c.Hidden=true`

Expand Down
8 changes: 8 additions & 0 deletions resource/dev.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Dev


## Tests

```shell
go test -v -test.run ^TestCommand_Run_X ./
```
1 change: 1 addition & 0 deletions show/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ contains `section, panel, padding, helpPanel, table, tree, title, list, multiLis

- https://github.com/InVisionApp/tabular
- https://github.com/gosuri/uitable
- https://github.com/tomlazar/table

0 comments on commit 7a02863

Please sign in to comment.