doccmd

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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

type Topic

type Topic struct {
	Name string
	Desc string
	Type string // file, git, dir
	Path string
}

Topic struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL