command

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Index

Constants

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

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 OutputFormatEnum

type OutputFormatEnum int
const (
	XMLFormatEn OutputFormatEnum
	JSONFormatEn
	TextFormatEn
	ScribbleFormatEn
)

type RootParameterSet

type RootParameterSet struct {
	ConfigFile string
	Language   string
}

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

type WidgetParameterSet

type WidgetParameterSet struct {
	Directory string
	Format    OutputFormatEnum
	Concise   bool
	Pattern   string
	Threshold uint

	// the following are supporting fields required for widget command
	//
	OutputFormatEnumInfo *assistant.EnumInfo[OutputFormatEnum]
	OutputFormatEn       assistant.EnumValue[OutputFormatEnum]
}

Jump to

Keyboard shortcuts

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