package cli

import "git.sr.ht/~seirdy/moac/v2/internal/cli"

Package cli contains functions shared between moac and moac-pwgen binaries

Index

Package Files

cli.go

Constants

const FloatFmt = "%.3g\n"

FloatFmt defines how many digits of a float to print.

Variables

var (

    // ErrBadCmdline indicates an invalid argument has been passed via the CLI.
    ErrBadCmdline = errors.New("bad arguments")
)

func DisplayErr

func DisplayErr(err error, extraLine string) bool

DisplayErr prints an error to stdout and returns true if it's nil.

func GetVersion

func GetVersion() string

GetVersion fetches the version of the MOAC binaries, configurable at link-time.

Version
v2.0.2 (latest)
Published
Oct 5, 2021
Platform
linux/amd64
Imports
4 packages (graph)
Last checked
2 weeks ago

Tools for package owners.