cmd

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigFilePath string

CLI flag for changing the configuration file path

View Source
var LogLevel int

CLI flag for changing the logging level

View Source
var RootCommand = &cobra.Command{
	Use:   "clog",
	Short: "Command Line Of Go - interactive helper",
	Long: `
Command Line Of Go (clog)
=========================
Clog aggregates:
  - snippets: command lines in your porject's colg.yaml
	-  scripts: files matching "clogrc/*.sh" - see below
	- commands: embedded functions compiled into clog

Create clog.yaml for a project
==========================================
clog Init  # run it twice to get a copy of the core.clog.yaml

Scripts in "clogrc/" must have the following 3 lines to be found by clog
==========================================
#  clog> commandName
# short> short help text
# extra> scripts need these 3 lines to be found by clog

Adding Snippets & macros
==========================================
edit clogrc/clog.yaml  # after you've made one

Running clog
==========================================
interactively: clog
as a web ui:   clog Svc && open localhost:8765
as api:      	 curl -H "Authorization: OAuth <ACCESS_TOKEN>" http://localhost:8765/api/version/command
`,
	Run: func(cmd *cobra.Command, args []string) {

		if ShowVersion {
			version.Command.Run(cmd, []string{})
		}
		if ShowVersionShort {
			version.Command.Run(cmd, []string{"short"})
		}
		if ShowVersionNote {
			version.Command.Run(cmd, []string{"note"})
		}

		_, err := ui.HomeMenu(cmd)
		if err != nil {
			panic(err)
		}
	},
}
View Source
var ShowVersion bool

CLI flag for showing the long version string

View Source
var ShowVersionNote bool

CLI flag for showing the note associated with this version

View Source
var ShowVersionShort bool

CLI flag for showing the short version string

Functions

func BootStrap

func BootStrap(bootCmd *cobra.Command) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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