util

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2013 License: MIT Imports: 8 Imported by: 0

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

func GetDownloadUrl(ver string) string

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

Jump to

Keyboard shortcuts

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