util

package
v0.0.0-...-466767c Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2014 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HttpPort          = flag.String("httpPort", os.Getenv("PORT"), "HTTP port for the server.")
	HeartbeatDuration = flag.Duration("subscribeHeartbeatDuration", time.Second*10, "Heartbeat interval for HTTP stream subscriptions.")
)
View Source
var IsEmptyString Checker = &isEmptyStringChecker{
	&CheckerInfo{Name: "IsEmptyString", Params: []string{"value"}},
}

The IsEmptyString checker tests whether the obtained string value equals "".

For example:

c.Assert("", IsEmptyString)
View Source
var IsFalse Checker = &isFalseChecker{
	&CheckerInfo{Name: "IsFalse", Params: []string{"value"}},
}

The IsFalse checker tests whether the obtained value is false. It's an alias for Not(IsTrue).

For example:

c.Assert(err, IsFalse)
View Source
var IsTrue Checker = &isTrueChecker{
	&CheckerInfo{Name: "IsTrue", Params: []string{"value"}},
}

The IsTrue checker tests whether the obtained value is true.

For example:

c.Assert(err, IsTrue)

Functions

func Count

func Count(metric string)

func CountMany

func CountMany(metric string, count int64)

func CountWithData

func CountWithData(metric string, count int64, extraData string, v ...interface{})

func GetNullByte

func GetNullByte() []byte

func TimeoutFunc

func TimeoutFunc(d time.Duration, ƒ func()) (ch chan bool)

Types

type NullByte

type NullByte []byte

func (NullByte) Get

func (nb NullByte) Get() []byte

type StringSliceUtil

type StringSliceUtil []string

func (StringSliceUtil) Contains

func (s StringSliceUtil) Contains(check string) bool

type UUID

type UUID string

func NewUUID

func NewUUID() (UUID, error)

Jump to

Keyboard shortcuts

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