pkg

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: MIT Imports: 12 Imported by: 42

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CastList

func CastList[To any, From any](list []From) ([]To, bool)

func InitLogger

func InitLogger() error

func InitLoggerWithConfig

func InitLoggerWithConfig(config *LogConfig) error

func InitViper

func InitViper(appName string, rootCmd *cobra.Command) error

Types

type CommandLocations

type CommandLocations struct {
	Embedded     []EmbeddedCommandLocation
	Repositories []string
}

func (*CommandLocations) LoadCommands

func (c *CommandLocations) LoadCommands(
	loader glazed_cmds.FSCommandLoader,
	helpSystem *help.HelpSystem,
	rootCmd *cobra.Command,
) ([]glazed_cmds.Command, []*glazed_cmds.CommandAlias, error)

type EmbeddedCommandLocation

type EmbeddedCommandLocation struct {
	FS      fs.FS
	Name    string
	Root    string
	DocRoot string
}

type LogConfig

type LogConfig struct {
	WithCaller bool
	Level      string
	LogFormat  string
	LogFile    string
}

Jump to

Keyboard shortcuts

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