nerd

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//GHReleasesURL is the GitHub API URL that lists all releases.
	GHReleasesURL = "https://api.github.com/repos/nerdalize/nerd/releases"
	//BuiltFromSourceVersion is the version when building form source (no real version).
	BuiltFromSourceVersion = "built.from.src"
)

Variables

View Source
var (
	//ErrNotImplemented is returned when a function is not yet implemented
	ErrNotImplemented = errors.New("not yet implemented")
)

Functions

func SetupLogging added in v0.2.3

func SetupLogging(verbose, json bool)

func VersionMessage added in v0.3.1

func VersionMessage(current string)

VersionMessage shows a message to the user if a new CLI version is available.

Types

type GHError added in v0.3.1

type GHError struct {
	Message string `json:"message"`
	URL     string `json:"documentation_url"`
}

GHError is an error object from the GitHub API.

type GHRelease added in v0.3.1

type GHRelease struct {
	Name    string `json:"name"`
	HTMLURL string `json:"html_url"`
}

GHRelease is a `release` object from the GitHub API.

type PlainFormatter added in v0.2.3

type PlainFormatter struct {
}

PlainFormatter is a Logrus formatter that only includes the log message.

func (*PlainFormatter) Format added in v0.2.3

func (f *PlainFormatter) Format(entry *logrus.Entry) ([]byte, error)

type SemVer added in v0.3.1

type SemVer struct {
	Major int
	Minor int
	Patch int
}

SemVer is a semantic version.

func ParseSemVer added in v0.3.1

func ParseSemVer(ver string) (*SemVer, error)

ParseSemVer parses a semantic version from string.

func (*SemVer) GreaterThan added in v0.3.1

func (s *SemVer) GreaterThan(other *SemVer) bool

GreaterThan checks if `s` is a greater semantic version than `other`

func (*SemVer) ToString added in v0.3.1

func (s *SemVer) ToString() string

ToString converts a SemVer to a string

type User

type User struct {
	Region string
}

User holds a reference to a user session

func GetCurrentUser

func GetCurrentUser() *User

GetCurrentUser returns the current user session

Directories

Path Synopsis
Package conf gives the CLI access to the nerd config file.
Package conf gives the CLI access to the nerd config file.

Jump to

Keyboard shortcuts

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