common

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BRANCH = "dev"

BRANCH of the Version

View Source
var COMMIT = "dirty"
View Source
var NAME = "cryptkey"

NAME of the App

View Source
var SUMMARY = "v1.0.0"

SUMMARY of the Version

View Source
var VERSION = "1.0.0"

VERSION of Release

Functions

func Before

func Before(ctx context.Context, c *cli.Command) (context.Context, error)

func Flags

func Flags() []cli.Flag

func GetCommands

func GetCommands() []*cli.Command

GetCommands -- retrieves all commands assigned to the main group, sorted by name.

func GetSubcommands

func GetSubcommands(group string) []*cli.Command

GetSubcommands retrieves all commands assigned to a group

func RegisterCommand

func RegisterCommand(command *cli.Command)

RegisterCommand -- allows you to register a command under the main group

func RegisterSubcommand

func RegisterSubcommand(group string, command *cli.Command)

RegisterSubcommand allows you to register a command under a group

Types

type AppVersionInfo

type AppVersionInfo struct {
	Name    string
	Version string
	Branch  string
	Summary string
	Commit  string
}

AppVersionInfo --

var AppVersion AppVersionInfo

AppVersion --

type ConsoleFormatter

type ConsoleFormatter struct {
	TimestampFormat string
	NoColor         bool
}

ConsoleFormatter formats logs in a human-readable console format similar to zerolog

func (*ConsoleFormatter) Format

func (f *ConsoleFormatter) Format(entry *logrus.Entry) ([]byte, error)

Format renders a single log entry

Jump to

Keyboard shortcuts

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