lib

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package lib contains some functionalities needed for expvastic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscardLogger

func DiscardLogger() *logrus.Logger

DiscardLogger returns a dummy logger. This is useful for tests when you don't want to actually write to the Stdout.

func GetLogger

func GetLogger(level string) *logrus.Logger

GetLogger returns the default logger with the given log level.

func IsGCType

func IsGCType(key string) bool

IsGCType returns true if the key corresponds to one

func IsMBType

func IsMBType(key string) bool

IsMBType returns true if key's value is a large byte value

func SanitiseURL added in v0.1.0

func SanitiseURL(url string) (string, error)

SanitiseURL prepends a protocol to the url if not defined, and checks if it's a valid url

func StringInMapKeys added in v0.1.0

func StringInMapKeys(niddle string, haystack map[string]string) bool

StringInMapKeys returns true if niddle is in the haystack's keys

func StringInSlice

func StringInSlice(niddle string, haystack []string) bool

StringInSlice returns true if niddle is in the haystack

Types

type DummyReadCloser

type DummyReadCloser struct{}

DummyReadCloser implements io.ReadCloser that does nothing

func (DummyReadCloser) Close

func (DummyReadCloser) Close() error

func (DummyReadCloser) Read

func (DummyReadCloser) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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