Documentation ¶
Overview ¶
Package dep provides a Dependency struct, a DependencyMap from nicknames (strings) to Dependencies, and functions to read and write a DependencyMap to a deps.json file
Index ¶
Constants ¶
View Source
const ( TypeGit = "git" TypeHg = "hg" TypeBzr = "bzr" TypeGitClone = "git-clone" )
Dependency Types
View Source
const DepsFile string = "deps.json"
The name of the dependency file
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Dependency struct { Repo string `json:"repo"` Version string `json:"version"` Type string `json:"type"` Alias string `json:"alias,omitempty"` }
Dependency defines a single dependency
func (*Dependency) Path ¶
func (d *Dependency) Path() (p string)
Path returns the path to the deps.json file that this DependencyMap was read from
type DependencyMap ¶
type DependencyMap struct { Map map[string]Dependency Path string }
DependencyMap defines a set of dependencies
func Read ¶
func Read(filename string) (deps DependencyMap, err error)
Read reads filename and parses the content into a DependencyMap
func (*DependencyMap) Write ¶
func (d *DependencyMap) Write() (err error)
Write the dependencyMap back into to the file it was read from
Click to show internal directories.
Click to hide internal directories.