utils

package
v0.0.0-...-2e9796e Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HelpTemplate = `
{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`
View Source
var UsageTemplate = `` /* 933-byte string literal not displayed */

UsageTemplate is identical to the default cobra usage template, but utilises WrappedFlagUsages to ensure flag usages don't wrap around.

Functions

func SetupLogger

func SetupLogger() (*zap.Logger, *os.File, error)

SetupLogger creates a zap logger instance that writes to a file. Due to the CLI heavily using bubbletea to provide interactive experiences,

func WrappedFlagUsages

func WrappedFlagUsages(cmd *pflag.FlagSet) string

WrappedFlagUsages wraps long descriptions for flags, this uses the users terminal size or width of 80 if cannot determine users width.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳