Documentation ¶
Index ¶
Constants ¶
View Source
const ChtHost = "https://cht.sh/"
View Source
const RandTopic = ":random"
Variables ¶
View Source
var DocumentCmd = &gcli.Command{ Name: "doc", Desc: "how to use for common tools or common commands", Aliases: []string{"htu", "docs"}, Subs: []*gcli.Command{ SearchCmd, LinuxCmd, InstallCmd, TopicListCmd, }, Config: func(c *gcli.Command) { c.AddArg("topic", "search document on the topic") }, Func: func(c *gcli.Command, args []string) error { topic := c.Arg("topic").String() if topic == "" { return c.ShowHelp() } return errorx.New("TODO") }, }
DocumentCmd instance
View Source
var InstallCmd = &gcli.Command{ Name: "install", Aliases: []string{"ins", "add"}, Desc: "install new documents topic from git repository(eg: github)", Config: func(c *gcli.Command) { }, Func: func(c *gcli.Command, _ []string) error { return errorx.New("TODO") }, }
InstallCmd instance
View Source
var LinuxCmd = &gcli.Command{ Name: "linux", Aliases: []string{"lin", "linux-cmd"}, Desc: "document for use linux commands", Config: func(c *gcli.Command) { }, Func: func(c *gcli.Command, _ []string) error { return errors.New("TODO") }, }
LinuxCmd instance https://github.com/jaywcjlove/linux-command/tree/master/command linux commands zh-CN documents
- raw contents eg: https://raw.githubusercontent.com/jaywcjlove/linux-command/master/command/accept.md 结构使用 https://raw.githubusercontent.com/jaywcjlove/linux-command/master/dist/data.json
View Source
var SearchCmd = &gcli.Command{ Name: "search", Aliases: []string{"find"}, Desc: "search document for use linux commands", Config: func(c *gcli.Command) { }, Func: func(c *gcli.Command, _ []string) error { return errorx.New("TODO") }, }
SearchCmd instance
View Source
var TopicListCmd = &gcli.Command{ Name: "list-topics", Aliases: []string{"list-topic", "lt"}, Desc: "list installed document topics", Config: func(c *gcli.Command) { }, Func: func(c *gcli.Command, _ []string) error { return errorx.New("TODO") }, }
TopicListCmd instance
Functions ¶
func NewCheatCmd ¶
func NewCheatCmd() *gcli.Command
NewCheatCmd instance
Query cheat for development
Example:
curl cheat.sh/tar curl cht.sh/curl curl https://cheat.sh/rsync curl https://cht.sh/php curl cht.sh/go/:list curl cht.sh/go/reverse+a+list curl cht.sh/python/random+list+elements curl cht.sh/js/parse+json curl cht.sh/lua/merge+tables curl cht.sh/clojure/variadic+function
Types ¶
Click to show internal directories.
Click to hide internal directories.