Documentation
¶
Index ¶
- func CastList[To any, From any](list []From) ([]To, bool)
- func CastMapMember[To any](m map[string]interface{}, k string) (*To, bool)
- func CastStringMap[To any, From any](m map[string]From) (map[string]To, bool)
- func CastStringMap2[To any, From any](m interface{}) (map[string]To, bool)
- func InitLogger() error
- func InitLoggerWithConfig(config *LogConfig) error
- func InitViper(appName string, rootCmd *cobra.Command) error
- type CommandLoader
- type CommandLocations
- type EmbeddedCommandLocation
- type LoadCommandsOption
- type LogConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CastMapMember ¶ added in v0.0.4
func CastStringMap ¶ added in v0.0.4
func CastStringMap2 ¶ added in v0.0.5
func InitLogger ¶
func InitLogger() error
func InitLoggerWithConfig ¶
Types ¶
type CommandLoader ¶ added in v0.0.9
type CommandLoader[T glazed_cmds.Command] struct { // contains filtered or unexported fields }
func NewCommandLoader ¶ added in v0.0.9
func NewCommandLoader[T glazed_cmds.Command](locations *CommandLocations) *CommandLoader[T]
func (*CommandLoader[T]) LoadCommands ¶ added in v0.0.9
func (c *CommandLoader[T]) LoadCommands( loader glazed_cmds.FSCommandLoader, helpSystem *help.HelpSystem, rootCmd *cobra.Command, options ...glazed_cmds.CommandDescriptionOption, ) ([]T, []*glazed_cmds.CommandAlias, error)
type CommandLocations ¶
type CommandLocations struct {
Embedded []EmbeddedCommandLocation
Repositories []string
AdditionalLayers []layers.ParameterLayer
HelpSystem *help.HelpSystem
}
func NewCommandLocations ¶ added in v0.0.6
func NewCommandLocations(options ...LoadCommandsOption) *CommandLocations
type EmbeddedCommandLocation ¶
type LoadCommandsOption ¶ added in v0.0.6
type LoadCommandsOption func(*CommandLocations)
func WithAdditionalLayers ¶ added in v0.0.6
func WithAdditionalLayers(layers ...layers.ParameterLayer) LoadCommandsOption
func WithEmbeddedLocations ¶ added in v0.0.6
func WithEmbeddedLocations(locations ...EmbeddedCommandLocation) LoadCommandsOption
func WithHelpSystem ¶ added in v0.0.6
func WithHelpSystem(helpSystem *help.HelpSystem) LoadCommandsOption
func WithRepositories ¶ added in v0.0.6
func WithRepositories(locations ...string) LoadCommandsOption
Click to show internal directories.
Click to hide internal directories.