common

package
v0.0.0-...-bac34fe Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoesItemExist

func DoesItemExist(item string) bool

func ErrorIsFile404

func ErrorIsFile404(err error) bool

func FormatCommandInfo

func FormatCommandInfo(info []CommandInfo, indentFlags bool) string

func GetFrontierVersion

func GetFrontierVersion() (string, error)

func GetHomeDir

func GetHomeDir() (string, error)

func ReadFile

func ReadFile(fileName string) (string, error)

func ReadNonemptyLine

func ReadNonemptyLine(msg, msgWhenEmpty string) string

func Readline

func Readline(msg string) string

func RunCommand

func RunCommand(command string, args ...string) (string, string, error)

func WriteFile

func WriteFile(filename string, data string) error

Types

type CommandInfo

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

func NewCommandInfo

func NewCommandInfo(short, long, desc string) CommandInfo

func (CommandInfo) Fmt

func (ci CommandInfo) Fmt(indent int) string

func (CommandInfo) FmtFlags

func (ci CommandInfo) FmtFlags() string

type Version

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

func CheckForFrontierUpdate

func CheckForFrontierUpdate() (bool, [2]Version, error)

func NewVersion

func NewVersion(major, minor, subminor int) Version

func NewVersionFromVersionString

func NewVersionFromVersionString(v string) (Version, error)

func (Version) Compare

func (v Version) Compare(ver Version) int

func (Version) Fmt

func (v Version) Fmt() string

Jump to

Keyboard shortcuts

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