tools

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendDotEnvExtension

func AppendDotEnvExtension(path string) string

append .env extension to path if not already there

func CheckDoubleDashS

func CheckDoubleDashS(input string, argName string) error

check if string input is part of argName. if you meant --argument, but wrote -argument, the value coming from cobra would be "rgument" example: if argName is "argument", v should not be "rgument"..

func ExtractFilenameArg

func ExtractFilenameArg(args []string) (s string)

extract filename from cobra args

func ExtractVaultNameArg

func ExtractVaultNameArg(args []string, vaults []string) (string, error)

extract vault name from cobra args

func GetVaultFile

func GetVaultFile(envfile string) (map[string]string, error)

open read vault options from .env.vaultopts

func GetVaultOptsPath

func GetVaultOptsPath(envfile string) string

func InitVaultFile

func InitVaultFile(envfile string, opts map[string]string) error

get vault options from .env.vaultopts

func MathMax

func MathMax(a, b int) int

return max of two ints

func MathMin

func MathMin(a, b int) int

return min of two ints

func TestVaultFileExists

func TestVaultFileExists(envfile string) error

func ToIndentedJson

func ToIndentedJson(data any) string

// returns whatever data as json, indented. for readability and debugging

func ValidateIsoDate

func ValidateIsoDate(s string) error

func VaultOptsExist

func VaultOptsExist(envfile string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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