cli_config

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 4 Imported by: ? 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 CreateKlothoConfigPath

func CreateKlothoConfigPath() error

func KlothoConfigPath

func KlothoConfigPath(file string) (string, error)

KlothoConfigPath returns a path to a file in ~/.klotho/<filename>

Types

type EnvVar added in v0.6.3

type EnvVar string

EnvVar represents an environment variable, specified by its key name. wrapper around os.Getenv. This string's value is the env var key. Use GetOr to get its value, or a default if the value isn't set.

func (EnvVar) GetBool added in v0.7.0

func (s EnvVar) GetBool() bool

GetBool returns the env var as a boolean.

The value is false if the env var is:

  • unset
  • the empty string ("")
  • "0" or "false" (case-insensitive)

The value is true for all other values, including other false-looking strings like "no".

func (EnvVar) GetOr added in v0.6.3

func (s EnvVar) GetOr(defaultValue string) string

GetOr uses os.Getenv to get the env var specified by the target EnvVar. If that env var's value is unset or empty, it returns the defaultValue.

func (EnvVar) IsSet added in v0.7.0

func (s EnvVar) IsSet() bool

Jump to

Keyboard shortcuts

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