Documentation ¶
Index ¶
Constants ¶
View Source
const ( NODE_VERSIONS = "http://nodejs.org/dist/npm-versions.txt" UNEXPECTED_ERR = "Unexpected error: %v" LSR_RESP_ERR = "Error getting list of versions, response status %v" LSR_ERR = "Error getting list of versions: %v" DIST_BASE_URL = "http://nodejs.org/dist" )
Variables ¶
View Source
var ( ErrorVersionNotFound = errors.New("Version not found") ErrorCantParseVersionArg = errors.New("Can't parse version argument") ErrorFullVersionMustBeSpecified = errors.New("Full version must be specified (e.g. 0.10.21)") ErrorNoNodeJsVersionSpecified = errors.New("No Node.js version specified") )
Functions ¶
func GetDownloadUrl ¶
GetDownloadUrl creates url string for specified version
Types ¶
type VersionList ¶
type VersionList interface { Add(verStr string) FindExact(verStr string) (string, error) FindNewest(verStr string) (string, error) Count() int Vers() []string }
func GetVersions ¶
func GetVersions() VersionList
GetVersions downloads version list from http://nodejs.org/dist/npm-versions.txt and converts it to VersionList structure
func NewVersionList ¶
func NewVersionList() VersionList
func NewVersionListFromSlice ¶
func NewVersionListFromSlice(vers []string) VersionList
Click to show internal directories.
Click to hide internal directories.