Documentation ¶
Index ¶
- Variables
- func DetectFormat(path string) (ypkg int, err error)
- type Package
- func Auto(sources []string) (pkg Package, err error)
- func Bump(path string) (pkg Package, err error)
- func Convert(path string, ypkg int) (pkg Package, err error)
- func Init(path string) (pkg Package, err error)
- func Lint(path string) (pkg Package, err error)
- func Load(path string) (pkg Package, err error)
- func NewPackage(ypkg int, f *os.File) (pkg Package, err error)
- func Update(path, version string, sources []string) (pkg Package, err error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Package ¶
type Package interface { // Load populates a PackageYML version by reading in the contents from a specific filepath Load(path string, mode int) error // Convert turns a versioned PackageYML into the intermediate internal.PackageYML representation Convert() (*internal.PackageYML, error) // Modify a versioned PackageYML with the contents of an internal.PackageYML Modify(changes internal.PackageYML) error // File returns the underlying file record File() *os.File // Save writes any changes to this PackageSpec to the currently open file descriptor Save() error // Close close the file descriptor for this PackageSpec Close() }
Package is a common interface to all version of the Package YML specification
func Auto ¶
Auto generates a new package my inspecting the contents of a list of sources
func Bump ¶
Bump increments the release number of a package.yml
func Convert ¶
Convert a package.yml from any version to another
func Init ¶
Init creates a new package.yml with the required field pre-populated like a template
func Lint ¶
Lint checks for errors and common mistakes in package.yml
func Load ¶
Load reads in any supported package.yml from file
func NewPackage ¶
NewPackage creates and empty package of the specified version, if supported
Click to show internal directories.
Click to hide internal directories.