utils

package
v0.0.0-...-74c434d Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Overview

Util functions that don't fit anywhere else.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustRenderTemplate

func MustRenderTemplate(tmplString string, i interface{}) (rendered string)

Delegates action to RenderTemplate. Panics in case of an error.

func RenderTemplate

func RenderTemplate(tmplString string, i interface{}) (rendered string, e error)

Render the template from the given string using text/template and the information from the interface provided.

Types

type Version

type Version struct {
	Major int
	Minor int
	Patch int
}

func ParseVersion

func ParseVersion(raw string) (v *Version, e error)

func (*Version) Parse

func (version *Version) Parse(raw string) error

func (*Version) Smaller

func (version *Version) Smaller(other *Version) bool

func (*Version) String

func (version *Version) String() string

Jump to

Keyboard shortcuts

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