Discover Packages
github.com/bettercallshao/kut
pkg
menu
package
Version:
v0.5.2
Opens a new window with list of versions in this module.
Published: Nov 23, 2020
License: MIT
Opens a new window with license information.
Imports: 13
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
Documentation
¶
Home retrieves path of kut home e.g. /home/james/.kut
Ingest a file into system store
List generates available menus
Path generates the path to the named menu
Render an action into a command
Repo retrieves path of local repo e.g. /home/james/.kut/menus
type Action struct {
Name string `json:"name" binding:"required"`
Help string `json:"help"`
Template string `json:"template" binding:"required"`
Params []Param `json:"params"`
}
Action struct: a thing a user can do
Menu struct: a list of actions
Parse a menu given a blob
type Param struct {
Name string `json:"name" binding:"required"`
Help string `json:"help"`
Value string `json:"value"`
}
Param struct: a parameter for a action
Source Files
¶
Click to show internal directories.
Click to hide internal directories.