util

package
v0.0.0-...-eff0ea3 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Unmarshal = func(r io.Reader, v interface{}) error {
	return json.NewDecoder(r).Decode(v)
}

Unmarshal is a function that unmarshals the data from the reader into the specified value. By default, it uses the JSON unmarshaller.

Functions

func CheckError

func CheckError(e error)

CheckError checks an error object for nil and panics if it isn't

func GetTestTeams

func GetTestTeams() []model.Team

GetTestTeams reads mock team data for testing

func GetTestTeamsPath

func GetTestTeamsPath(path string) []model.Team

GetTestTeamsPath reads mock team data for testing

func LoadEnv

func LoadEnv()

LoadEnv pulls in .env variables

func ParseURL

func ParseURL(queryString, urlArg string) (string, error)

ParseURL reads query params from a URL

func TestError

func TestError(t *testing.T, e error)

TestError checks and error for nil and t.Fatals it if it isn't

func WriteToFile

func WriteToFile(teams []model.Team)

WriteToFile for testing

Types

This section is empty.

Jump to

Keyboard shortcuts

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