Go module with some common utility functions.
Included tools are:
- CreateDirIfNotExist: Create a directory, including parent directories, if it does not exist
- DownloadStaticFile: Downloads a static file from a given directory
-
JSON tools:
- ReadJSON: Read JSON
- WriteJSON: Write JSON
- ErrorJSON: Produce a JSON encoded error response
- PostJSONToRemote: Post JSON to a remote service
- RandomString: Returns a random string of length n
- Slugify: Create an URL safe slug from a string
- UploadFile: Upload a file to a specified location
- UploadFiles: Upload multiple files to a specified location
go get github.com/yoyodyne-build/toolkit