cmd

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

The root file contains common helper functions used by other commands. Major commands can be in seperate files for ease of readability.

Index

Constants

This section is empty.

Variables

View Source
var (
	ApplicationMetadata gatecheck.ApplicationMetadata
	LogLeveler          *slog.LevelVar = &slog.LevelVar{}
)

Functions

func LoadConfigFromFile

func LoadConfigFromFile(config *gatecheck.Config, filename string) error

LoadConfigFromFile loads config object with values after reading the file

func LoadConfigFromFileOrReader

func LoadConfigFromFileOrReader(config *gatecheck.Config, filename string, src io.Reader, filetype string) error

LoadConfigFromFileOrReader will either load the config object with values after opening file or reading in from src

Either a filename or a src and filetype must be defined or this function will error

func LoadConfigFromReader

func LoadConfigFromReader(config *gatecheck.Config, src io.Reader, filetype string) error

LoadConfigFromReader loads config object with values from src. filetype is mandatory

func NewGatecheckCommand

func NewGatecheckCommand() *cobra.Command

NewGatecheckCommand the root for all CLI commands

func ParsedOutput

func ParsedOutput(output string) (format, filename string)

ParsedOutput splits the format and filename

expects the `--output` argument in the <format>=<filename> format

func WriteConfigInfo

func WriteConfigInfo(w io.Writer, v *viper.Viper, config *gatecheck.Config) error

WriteConfigInfo as a human readable display table

Types

This section is empty.

Jump to

Keyboard shortcuts

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