github.com/yoyodyne-build/toolkit

Go module of commonly used utility functions Resources


License
BSD-3-Clause
Install
go get github.com/yoyodyne-build/toolkit

Documentation

Built with GoLang Version License Go Report Card Go Reference Tests Go Coverage

Toolkit

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

Installation

go get github.com/yoyodyne-build/toolkit