util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BhojpurEnvPrefix = "BHOJPUR"
)
View Source
const (
	CommandProcessOutput = "command.process.output"
)

Variables

View Source
var DefaultContext *context.Context

Functions

func BindValuesFlags

func BindValuesFlags(cmd *cobra.Command)

func DisplayVersionBanner

func DisplayVersionBanner(c *context.Context, version func() string, license []string)

func HandleLock

func HandleLock()

func InitContext

func InitContext(cmd *cobra.Command) (ctx *context.Context, err error)

InitContext inits the context by parsing the configurations from viper this is meant to be run before each command to be able to parse any override from the CLI/ENV

func InitViper

func InitViper(RootCmd *cobra.Command)

InitViper inits a new viper this is meant to be run just once at beginning to setup the root command

func TemplateFolders

func TemplateFolders(ctx *context.Context, i installer.BuildTreeResult, treePaths []string) []string

TemplateFolders returns the default folders which holds shared template between packages in a given tree path

func ValuesFlags

func ValuesFlags() []string

Types

type ListWriter

type ListWriter struct {
	// contains filtered or unexported fields
}

func (*ListWriter) AppendItem

func (l *ListWriter) AppendItem(item pterm.BulletListItem)

func (*ListWriter) Render

func (l *ListWriter) Render()

type TableWriter

type TableWriter struct {
	// contains filtered or unexported fields
}

func (*TableWriter) AppendRow

func (l *TableWriter) AppendRow(item []string)

func (*TableWriter) Render

func (l *TableWriter) Render()

Jump to

Keyboard shortcuts

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