config

package
v2.8.21 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBoolFlag

func GetBoolFlag(key string) bool

func GetFlag

func GetFlag(key, fallback string) string

func GetIntFlag

func GetIntFlag(key string, fallback int) int

func GetStringSliceFlag

func GetStringSliceFlag(key string, fallback []string) []string

func LoadFlags

func LoadFlags() error

func MarshalLocalYAMLFile

func MarshalLocalYAMLFile(path string, obj interface{}) error

MarshalLocalYAMLFile writes JSON or YAML to a file on disk. The caller is responsible for checking error return values.

func ReadRemoteFile

func ReadRemoteFile(url string) ([]byte, error)

ReadRemoteFile issues a GET request to retrieve the contents of the specified URL as a byte array. The caller is responsible for checking error return values.

func Unmarshal

func Unmarshal(data []byte, obj interface{}) error

func UnmarshalLocalFile

func UnmarshalLocalFile(path string, obj interface{}) error

UnmarshalLocalFile retrieves JSON or YAML from a file on disk. The caller is responsible for checking error return values.

func UnmarshalReader

func UnmarshalReader(reader io.Reader, obj interface{}) error

UnmarshalReader is used to read manifests from stdin

func UnmarshalRemoteFile

func UnmarshalRemoteFile(url string, obj interface{}) error

UnmarshalRemoteFile retrieves JSON or YAML through a GET request. The caller is responsible for checking error return values.

Types

This section is empty.

Jump to

Keyboard shortcuts

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