config

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LocateUserConfigFile

func LocateUserConfigFile() (string, error)

LocateUserConfigFile locates a .bazeliskrc file in the user's home directory.

func LocateWorkspaceConfigFile

func LocateWorkspaceConfigFile() (string, error)

LocateWorkspaceConfigFile locates a .bazeliskrc file in the current workspace root.

Types

type Config

type Config interface {
	Get(name string) string
}

Config allows getting Bazelisk configuration values.

func FromEnv

func FromEnv() Config

FromEnv returns a Config which gets config values from environment variables.

func FromFile

func FromFile(path string) (Config, error)

FromFile returns a Config which gets config values from a Bazelisk config file.

func Layered

func Layered(configs ...Config) Config

Layered returns a Config which gets config values from the first of a series of other Config values which sets the config.

func Null

func Null() Config

Null returns a Config with no config values.

func Static

func Static(values map[string]string) Config

Static returns a Config with static values.

Jump to

Keyboard shortcuts

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