Package util contains a few simple utilites that has no internal dependencies. This is to encourage reuse of code.
Debug will return a debug(format, arg, arg...) function for which messages will be printed if the DEBUG environment variable is set.
This is useful for development debugging only. Do not use this for messages that has any value in production.
Download downloads the request file in the url
Markdown strips space indentation and replaces ' with `, allowing for markdown to be written as indended multi-line strings.
func Parallel(f ...func())
Parallel takes a list of functions and calls them all in concurrently, returning when all the functions are done.
This doesn't have any nice error or panic handling and is aimed as construct to be used inside other functions, mainly to reduce boiler-plate.
Spawn N go routines and wait for them to return.
This utility is smart when instantiating elements in an array concurrently.
StringList is a list of strings and useful methods
Add a list of strings
Contains returns true if s contains value
Join concatenates elements fo the list with given separator
Sprint adds a string using fmt.Sprint syntax
Sprintf adds a string using fmt.Sprintf syntax