core

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2018 License: Artistic-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PackageFile   = "qpm.json"
	SignatureFile = "qpm.asc"
	Vendor        = "vendor"
	Address       = "pkg.qpm.io:7000"
	LicenseFile   = "LICENSE"
)

Variables

View Source
var (
	Version = "0.X.x"
	Build   = "master"
)
View Source
var UA = fmt.Sprintf("qpm/%v (%s; %s)", Version, runtime.GOOS, runtime.GOARCH)

Functions

func IntMax

func IntMax(a, b int) int

func IntMin

func IntMin(a, b int) int

func PrintSearchResults

func PrintSearchResults(results []*msg.SearchResult)

Pretty prints a table of package SearchResults.

func ToDateTime

func ToDateTime(in string) time.Time

func WriteTemplate

func WriteTemplate(filename string, tpl *template.Template, data interface{}) error

Renders the given template using the fields contained in the data parameter and outputs the result to the given file. If the file already exists, it will be overwritten.

Types

type Context

type Context struct {
	Log    *log.Logger
	Client msg.QpmClient
}

func NewContext

func NewContext() *Context

Jump to

Keyboard shortcuts

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