config

package
v0.0.0-...-e8b1e36 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindConfigPath

func FindConfigPath(startFolder string) (configPath string, deprecatedRepositoryProjectRoot string, err error)

Types

type Config

type Config struct {
	Repository string `json:"repository"`

	Storage string `json:"storage"` // deprecated
}

Config is keepsake.yaml

func FindConfig

func FindConfig(dir string) (conf *Config, projectDir string, err error)

FindConfig searches the given directory and any parent directories for keepsake.yaml, then loads it

func FindConfigInWorkingDir

func FindConfigInWorkingDir(overrideDir string) (conf *Config, projectDir string, err error)

FindConfigInWorkingDir searches working directory and any parent directories for keepsake.yaml (or keepsake.yml) and loads it.

This function can also be used to discover the source dir -- it returns a (config, projectDir) tuple.

If overrideDir is passed, it uses that directory instead.

func LoadConfig

func LoadConfig(configPath string) (conf *Config, err error)

LoadConfig reads and validates keepsake.yaml

func Parse

func Parse(text []byte, dir string) (conf *Config, err error)

Parse keepsake.yaml

Jump to

Keyboard shortcuts

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