cli

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const APPNAME string = "mwcli"

APPNAME to be used throughout the application.

Variables

View Source
var MwddIsDevAlias = false

MwddIsDevAlias is the current way to build the mwdd command with the dev alias (may want to clean this up).

View Source
var SkipRenderMarkdown = false

SkipRenderMarkdown allows markdown rendering to be skipped in certain situations.

Functions

func CIUserDirectoryPath added in v0.20.0

func CIUserDirectoryPath() string

func LegacyUserDirectoryPath added in v0.20.0

func LegacyUserDirectoryPath() string

LegacyUserDirectoryPath is the application configuration directory path for the user determined by legacy method and should be considered deprecated.

func RenderMarkdown

func RenderMarkdown(markdownIn string) string

RenderMarkdown converts markdown into something nice to be displayed on the terminal.

func UserDirectoryPath

func UserDirectoryPath() string

UserDirectoryPath is the application configuration directory path for the user.

func UserDirectoryPathForCmd

func UserDirectoryPathForCmd(cmdName string) string

UserDirectoryPathForCmd is the application configuration directory path for the user for a specific command.

func XDGUserDirectoryPath added in v0.20.0

func XDGUserDirectoryPath() string

XDGUserDirectoryPath is the application configuration directory path for the user determined by XDG.

Types

type Options

type Options struct {
	// NoInteraction means commands should not ask for user interaction
	NoInteraction bool
	// Verbosity a modifier that can be added to the default logrus level to increase output verbosity. Maximum 2.
	Verbosity int
	// Telemetry do we want to record telemetry data?
	Telemetry bool
}
var Opts Options

Options that are global throughout the CLI.

type VersionAttributes

type VersionAttributes struct {
	GitCommit  string // holds short commit hash of source tree.
	GitBranch  string // holds current branch name the code is built off.
	GitState   string // shows whether there are uncommitted changes.
	GitSummary string // holds output of git describe --tags --dirty --always.
	BuildDate  string // holds RFC3339 formatted UTC date (build time).
	Version    string // hold contents of ./VERSION file, if exists, or the value passed via the -version option.
}
var VersionDetails VersionAttributes

Jump to

Keyboard shortcuts

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