Documentation
¶
Index ¶
- Constants
- Variables
- func Find(startDir string) (string, error)
- func InvalidEnvKeyError(key string) error
- func Mutate(path string, fn func(File) (File, error)) error
- func PkgEntriesEqual(a, b PkgEntries) bool
- func RemoveEnv(path string, keys []string) error
- func RemovePackage(path, pkgName string) error
- func Replace(path string, file File) error
- func Resolve(scope Scope) (string, error)
- func ResolveExisting(scope Scope) (string, error)
- func UpsertManyEnv(path string, updates EnvEntries) error
- func UpsertManyPackages(path string, updates PkgEntries) error
- func ValidEnvKey(s string) bool
- func Write(path string, file File) error
- type EnvEntries
- type EnvEntry
- type File
- type PkgEntries
- type PkgEntry
- type Scope
Constants ¶
View Source
const Filename = "nem.ver"
Variables ¶
View Source
var ErrManifestNotFound = errors.New("manifest file not found in current or any parent directory")
Functions ¶
func InvalidEnvKeyError ¶ added in v0.7.0
InvalidEnvKeyError is the error for a key rejected by ValidEnvKey.
func PkgEntriesEqual ¶
func PkgEntriesEqual(a, b PkgEntries) bool
func RemovePackage ¶
func Resolve ¶
Resolve returns the path for scope. The file may not exist yet; callers that need it to exist must use ResolveExisting.
func ResolveExisting ¶
func UpsertManyEnv ¶
func UpsertManyEnv(path string, updates EnvEntries) error
func UpsertManyPackages ¶
func UpsertManyPackages(path string, updates PkgEntries) error
func ValidEnvKey ¶
Types ¶
type EnvEntries ¶
type EnvEntries []EnvEntry
func (EnvEntries) ByKey ¶
func (e EnvEntries) ByKey() map[string]string
type File ¶
type File struct {
Packages PkgEntries
Env EnvEntries
}
type PkgEntries ¶
type PkgEntries []PkgEntry
func MergePackages ¶
func MergePackages(entries ...PkgEntries) PkgEntries
func (PkgEntries) ByName ¶
func (e PkgEntries) ByName() map[string]PkgEntry
func (PkgEntries) Direct ¶
func (e PkgEntries) Direct() PkgEntries
func (PkgEntries) Indirect ¶
func (e PkgEntries) Indirect() PkgEntries
func (PkgEntries) Refs ¶
func (e PkgEntries) Refs() pkg.Refs
Click to show internal directories.
Click to hide internal directories.