Documentation ¶
Overview ¶
Package nut provides API for managing versioned Go source code packages, called "nuts".
Index ¶
Constants ¶
const ( ExampleFullName = "Crazy Nutter" ExampleEmail = "crazy.nutter@gonuts.io" SpecFileName = "nut.json" )
Variables ¶
var VendorRegexp = regexp.MustCompile(`^[0-9a-z][0-9a-z_-]*$`)
var VersionRegexp = regexp.MustCompile(`^(\d+).(\d+).(\d+)$`)
Current format for nut version.
Functions ¶
func CheckPackage ¶
Check package for errors and return them.
Types ¶
type Nut ¶
Describes nut – a Go package with associated meta-information. It embeds Spec and build.Package to provide easy access to properties: Nut.Name instead of Nut.Package.Name, Nut.Version instead of Nut.Spec.Version.
func (*Nut) FilePath ¶ added in v0.3.0
Returns canonical filepath in format <prefix>/<vendor>/<name>-<version>.nut (with "\" instead of "/" on Windows).
func (*Nut) ImportPath ¶ added in v0.3.0
Returns canonical import path in format <prefix>/<vendor>/<name>
type NutFile ¶
Describes .nut file (a ZIP archive).
type Spec ¶
type Spec struct { Version Version Vendor string Authors []Person ExtraFiles []string Homepage string }
Describes part of nut meta-information, stored in file nut.json.
type Version ¶
Describes nut version. See http://gonuts.io/-/doc/versioning for explanation of version specification.
func (*Version) UnmarshalJSON ¶
Unmarshal from JSON.