Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultWriter = func(buildPlan BuildPlan) error { root, err := internal.OsArgs(2) if err != nil { return err } for name, dep := range buildPlan { s, err := internal.ToTomlString(dep) if err != nil { return err } if err := internal.WriteToFile(strings.NewReader(s), filepath.Join(root, name), 0644); err != nil { return err } } return nil }
DefaultWriter writes the build plan to a collection of files rooted at os.Args[2].
Functions ¶
This section is empty.
Types ¶
type BuildPlan ¶
type BuildPlan map[string]Dependency
BuildPlan represents the dependencies contributed by a build. Note that you may need to call Init() to load contents from os.Stdin.
func (BuildPlan) Init ¶
Init initializes the BuildPlan by reading os.Stdin. Will block until os.Stdin is closed.
type Dependency ¶
type Dependency struct {
// Version is the optional dependency version.
Version string `toml:"version"`
// Metadata is additional metadata attached to the dependency.
Metadata Metadata `toml:"metadata"`
}
Dependency represents a dependency in a build.
func (Dependency) String ¶
func (d Dependency) String() string
String makes Dependency satisfy the Stringer interface.
Click to show internal directories.
Click to hide internal directories.