Documentation ¶
Overview ¶
Package cli exposes a CLI interface to the Kythe services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultFileCorpus is the --corpus flag used by source/decor/diagnostics // commands to construct a file ticket from a raw file path. DefaultFileCorpus string // DefaultFileRoot is the --root flag used by source/decor/diagnostics commands // to construct a file ticket from a raw file path. DefaultFileRoot string // DefaultFilePathPrefix is the --path_prefix flag used by // source/decor/diagnostics commands to construct a file ticket from a raw file // path. DefaultFilePathPrefix string )
var DisplayJSON bool
DisplayJSON is true if the user wants all service responses to be displayed as JSON (using the PrintJSON and PrintJSONMessage functions).
Functions ¶
func Execute ¶
func Execute(ctx context.Context, api API) subcommands.ExitStatus
Execute registers all Kythe CLI commands to subcommands.DefaultCommander and executes it with the given API.
func LogRequest ¶
LogRequest should be passed all proto request messages for logging.
func PrintJSON ¶
func PrintJSON(val interface{}) error
PrintJSON prints the given value to the console. This should be called whenever the DisplayJSON flag is true. PrintJSONMessage should be preferred when possible.
func PrintJSONMessage ¶
PrintJSONMessage prints the given proto message to the console. This should be called whenever the DisplayJSON flag is true.
func RegisterCommand ¶
func RegisterCommand(c KytheCommand, group string)
RegisterCommand adds a KytheCommand to the list of subcommands for the specified group.