cli

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const MWCLIDIR string = ".mwcli"

MWCLIDIR name of the directory for storing application files.

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 RenderMarkdown

func RenderMarkdown(markdownIn string) string

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

func UserDirectoryPath

func UserDirectoryPath() string

UserDirectoryPath returns the MWCLIDIR in the user home directory (or similar directory) that can be used for storage.

func UserDirectoryPathForCmd

func UserDirectoryPathForCmd(cmdName string) string

UserDirectoryPathForCmd is a path within the application directory for the user that can be used for storage for the command.

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