helpers

package
v0.0.0-...-6ae7817 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Silent  = true
	Verbose = false
)

Variables

View Source
var (
	BackyardWorldsPlanet9Scan01First2 []string
	BackyardWorldsPlanet9Scan01First4 []string
	BackyardWorldsPlanet9Scan01First6 []string

	BackyardWorldsPlanet9Scan01Last4 []string

	BackyardWorldsPlanet9Scan02 []string

	ProfilesConfigData cfg.ProfilesConfigMap
	SchemesConfigData  common.SchemesConfig
	SamplerConfigData  common.SamplerConfig
	AdvancedConfigData common.AdvancedConfig
	LoggingConfigData  common.LoggingConfig
)

Functions

func JoinCwd

func JoinCwd(segments ...string) string

func Log

func Log() string

func MockConfigFile

func MockConfigFile(vfs storage.VirtualFS, configPath string) error

MockConfigFile create a dummy config file in the file system specified

func Normalise

func Normalise(p string) string

func Path

func Path(parent, relative string) string

func ReadGlobalConfig

func ReadGlobalConfig(configPath string) error

func Reason

func Reason(name string) string

func Repo

func Repo(relative string) string

func ResetFS

func ResetFS(index string, silent bool) (vfs storage.VirtualFS, root string)

func Root

func Root() string

func Scientist

func Scientist(vfs storage.VirtualFS, index string, silent bool) string

func SetupTest

func SetupTest(
	index, configPath, l10nPath string,
	silent bool,
) (vfs storage.VirtualFS, root string)

func UseI18n

func UseI18n(l10nPath string) error

Types

type CommandTester

type CommandTester struct {
	Args []string
	Root *cobra.Command
}

CommandTester eases creation of unit tests for cobra command

func (*CommandTester) Execute

func (ch *CommandTester) Execute() (string, error)

type DetectorStub

type DetectorStub struct {
}

func (*DetectorStub) Scan

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

type Directory

type Directory struct {
	XMLName     xml.Name    `xml:"directory"`
	Name        string      `xml:"name,attr"`
	Files       []File      `xml:"file"`
	Directories []Directory `xml:"directory"`
}

type DirectoryQuantities

type DirectoryQuantities struct {
	Files   uint
	Folders uint
}

type DirectoryTreeBuilder

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

type ExecutorStub

type ExecutorStub struct {
	Name string
}

func (*ExecutorStub) Execute

func (e *ExecutorStub) Execute(_ ...string) error

func (*ExecutorStub) Look

func (e *ExecutorStub) Look() (string, error)

func (*ExecutorStub) ProgName

func (e *ExecutorStub) ProgName() string

type File

type File struct {
	XMLName xml.Name `xml:"file"`
	Name    string   `xml:"name,attr"`
	Text    string   `xml:",chardata"`
}

type Tree

type Tree struct {
	XMLName xml.Name  `xml:"tree"`
	Root    Directory `xml:"directory"`
}

Jump to

Keyboard shortcuts

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