config

package
v0.0.64 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(configName string, configDir string, version string) (*config.Config, error)

func LoadRemote added in v0.0.62

func LoadRemote(ctx context.Context, url string, noCache bool, version string, options ...LoadOption) (*config.Config, error)

LoadRemote downloads (or loads from cache) a remote lets.yaml at url. Its root is the caller's cwd, same as for a local config.

func LoadWithContext added in v0.0.62

func LoadWithContext(ctx context.Context, configName string, configDir string, version string, options ...LoadOption) (*config.Config, error)

Types

type LoadOption added in v0.0.62

type LoadOption func(*loadOptions)

func WithNoCache added in v0.0.62

func WithNoCache() LoadOption

func WithProgress added in v0.0.62

func WithProgress(progress fetch.ProgressObserver) LoadOption

type PathInfo

type PathInfo struct {
	Filename string
	AbsPath  string
	// ConfigDir is the directory holding the config file. Config assembly
	// (mixin paths) resolves against it.
	ConfigDir string
	// RootDir is where commands run by default. Everything a command reads or
	// runs resolves against it, unless the command sets work_dir.
	RootDir string
	// .lets abs path
	DotLetsDir string
}

func FindConfig

func FindConfig(configName string, configDirFlag string) (PathInfo, error)

FindConfig will try to find best match for config file. Rules are: - if specified configName - try to load only that file - if specified configDir - try to look for a config only in that dir - don't do recursion - if not specified any of params above - try to find config recursively.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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