command

package
v0.0.0-...-1fdf9ae Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Index

Constants

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

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(setter ...ExecutionOptionsFn) error

Types

type Bootstrap

type Bootstrap struct {
	Detector LocaleDetector
	// 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() *cobra.Command

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

type ConfigureOptionFn

type ConfigureOptionFn func(*configureOptions)

type ExecutionOptions

type ExecutionOptions struct {
	Detector LocaleDetector
	From     *xi18n.LoadFrom
}

type ExecutionOptionsFn

type ExecutionOptionsFn func(o *ExecutionOptions)

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 {
	ConfigFile string
	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