cl

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package cl contains global variables used across the cli package. Yeah its probably a bad pattern but it works and removes us from dependency hell.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitState

func InitState(cmd *cobra.Command)

Init harness for command line functions, used to provide different functionality during the life of a command line run.

Types

type Harness

type Harness struct {
	Fmt            polyfmt.Formatter
	Config         *config.CLI
	ConfigFilePath string
}

Harness is a structure for values that all commands need access to.

var State *Harness

State holds values that aid in the lifetime of a command.

func (*Harness) Connect

func (s *Harness) Connect() (*grpc.ClientConn, error)

func (*Harness) NewConfig

func (s *Harness) NewConfig(configPath string)

func (*Harness) NewFormatter

func (s *Harness) NewFormatter()

func (*Harness) WriteConfig added in v0.5.0

func (s *Harness) WriteConfig() error

writeConfig takes the current representation of config and writes it to the file.

Jump to

Keyboard shortcuts

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