dir

package
v0.0.0-...-dfb0087 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// ConfigDirEnvName is the name of the environment variable that can be used
	// to override the config directory.
	ConfigDirEnvName = "KN_CONFIG_DIR"

	// CacheDirEnvName is the name of the environment variable that can be used
	// to override the cache directory.
	CacheDirEnvName = "KN_CACHE_DIR"
)

Variables

This section is empty.

Functions

func Cache

func Cache(ctx context.Context) string

Cache returns the path to the cache directory. It will be created if it does not exist.

func Config

func Config(ctx context.Context) string

Config returns the path to the config directory. It will be created if it does not exist.

func WithCacheDir

func WithCacheDir(ctx context.Context, p string) context.Context

WithCacheDir returns a new context with the given cache directory configured. It should be used for testing only.

func WithConfigDir

func WithConfigDir(ctx context.Context, p string) context.Context

WithConfigDir returns a new context with the given config directory configured. It should be used for testing only.

Types

This section is empty.

Jump to

Keyboard shortcuts

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