Documentation ¶
Index ¶
- Variables
- func Elide(value string) string
- func MakeNewPassword(oldPass string) string
- func PrintResource(t *testing.T, resource interface{})
- func RandomInt(min, max int) int
- func RandomString(prefix string, n int) string
- func WaitFor(predicate func() (bool, error)) error
- func WaitForTimeout(predicate func() (bool, error), timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTimeout = errors.New("Timed out")
ErrTimeout is returned if WaitFor/WaitForTimeout take longer than their timeout duration.
Functions ¶
func Elide ¶
Elide returns the first bit of its input string with a suffix of "..." if it's longer than a comfortable 40 characters.
func MakeNewPassword ¶
MakeNewPassword generates a new string that's guaranteed to be different than the given one.
func PrintResource ¶
PrintResource returns a resource as a readable structure
func RandomString ¶
RandomString generates a string of given length, but random content. All content will be within the ASCII graphic character set. (Implementation from Even Shaw's contribution on http://stackoverflow.com/questions/12771930/what-is-the-fastest-way-to-generate-a-long-random-string-in-go).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.