dep

package
v0.0.0-...-f8895a0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2013 License: MIT Imports: 8 Imported by: 0

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 New

func New() (d DependencyMap)

New returns a newly constructed DependencyMap

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

Jump to

Keyboard shortcuts

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