config

package
v0.0.0-...-17799e2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	JigDirName = ".jig"
)

Variables

View Source
var (
	ManifestName  = "manifest.json"
	ErrNoManifest = errors.New("No manifest exists")
)
View Source
var (
	// ErrNoJigRoot is returned when no Jig root can be found
	ErrNoJigRoot = errors.New("Could not find Jig root")
)

Functions

func CreateJigRoot

func CreateJigRoot(path string) error

func FindClosestJigRoot

func FindClosestJigRoot(path string) (string, error)

func FindJigRoot

func FindJigRoot() (string, error)

func IsJigRoot

func IsJigRoot(path string) bool

func JigRootDir

func JigRootDir(path string) string

func ManifestPath

func ManifestPath(dir string) (string, error)

Types

type Manifest

type Manifest struct {
	Repos []*Repo
}

Manifest represents a serialized description of the repositories to check out

func DefaultManifest

func DefaultManifest(dir string) (*Manifest, error)

func FromJSON

func FromJSON(r io.Reader) (*Manifest, error)

FromJSON creates a Manifest from a JSON reader

func JigRootManifest

func JigRootManifest() (*Manifest, error)

func (*Manifest) Add

func (m *Manifest) Add(repo *Repo) error

func (*Manifest) Save

func (m *Manifest) Save(dir string) error

func (*Manifest) ToJSON

func (m *Manifest) ToJSON(w io.Writer) error

type Repo

type Repo struct {
	Repo string
	Ref  string
}

Jump to

Keyboard shortcuts

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