cli

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Conf *parser.Parser
	Root *cli.Command
}

Base is a struct that holds the configuration parser and the root command.

var Cli *Base

Cli is an instance of Base that holds the configuration parser and root command.

func (*Base) CreateCmd

func (cli *Base) CreateCmd()

CreateCmd adds the "create" command to the CLI root command.

func (*Base) DeleteCmd

func (cli *Base) DeleteCmd()

DeleteCmd adds the "rm" command to the CLI, allowing users to delete a configuration section by name.

func (*Base) InitCmd

func (cli *Base) InitCmd()

InitCmd initializes the CLI with the "init" command.

func (*Base) UpdateCmd

func (cli *Base) UpdateCmd()

UpdateCmd adds the "set" command to the CLI, allowing users to configure templates.

type IBase

type IBase interface {
	InitCmd()
	CreateCmd()
	UpdateCmd()
	DeleteCmd()
}

IBase defines the interface for initializing commands.

Jump to

Keyboard shortcuts

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