command

package
v0.0.0-...-0da6071 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Index

Constants

View Source
const (
	AppEmoji        = "🦄"
	ApplicationName = "warrior"
	RootPsName      = "root-ps"
	SourceID        = "github.com/plastikfan/warrior"
)

Variables

View Source
var (
	Version = strings.TrimSpace(version)
)

TODO: The version.txt should be updated in ci to contain the version number associated with the applied tag. Currently not yet defined in this template.

Functions

func Execute

func Execute() error

Types

type Bootstrap

type Bootstrap struct {
	// contains filtered or unexported fields
}

Bootstrap represents construct that performs start up of the cli without resorting to the use of Go's init() mechanism and minimal use of package global variables.

func (*Bootstrap) Root

func (b *Bootstrap) Root(options ...ConfigureOptionFn) *cobra.Command

Root builds the command tree and returns the root command, ready to be executed.

type ConfigInfo

type ConfigInfo struct {
	Name       string
	ConfigType string
	ConfigPath string
	Viper      configuration.ViperConfig
}

type ConfigureOptionFn

type ConfigureOptionFn func(*ConfigureOptions)

type ConfigureOptions

type ConfigureOptions struct {
	Detector LocaleDetector
	Config   ConfigInfo
}

type Jabber

type Jabber struct {
}

Jabber is a LocaleDetector implemented using jibberjabber.

func (*Jabber) Scan

func (j *Jabber) Scan() language.Tag

Scan returns the detected language tag.

type LocaleDetector

type LocaleDetector interface {
	Scan() language.Tag
}

type RootParameterSet

type RootParameterSet struct {
	Language string
}

CLIENT-TODO: define valid properties on the root parameter set

Jump to

Keyboard shortcuts

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