Categorygithub.com/pokt-foundation/utils-go
module
0.11.1
Repository: https://github.com/pokt-foundation/utils-go.git
Documentation: pkg.go.dev

# README

Utils Go

The Utils Go package provides common used utility funcs, an HTTP client and more to other Go backend packages.

Pre-Commit Installation

Run the command make init-pre-commit from the repository root.

Once this is done, the following commands will be performed on every commit to the repo and must pass before the commit is allowed:

  • go-fmt - Runs gofmt
  • go-imports - Runs goimports
  • golangci-lint - run golangci-lint run ./...
  • go-critic - run gocritic check ./...
  • go-build - run go build
  • go-mod-tidy - run go mod tidy -v

# Packages

Package client is a wrapper for the default go client with default and configurable options It also has some utility functions to do actual requests.
Package crypto handles all encryption related funcs.
Package domain includes a domain extraction function from urls.
Package environment is a set of functions to get env values or their default It has the autoload from .env files.
Package id handles all ID related funcs.
Package jsonresponse has functions for returning JSONs in APIs.
No description provided by the author
Package mock is for doing mocks for http request in unit testing It's a wrapper for github.com/jarcoal/httpmock library.
Package numbers includes all funcs for manipulating and examining numbers.
Package parser is a set of functions for parsing data.
Package random includes all funcs for generating randomness.
Package strings includes all funcs for manipulating and examining strings.
Package time includes all funcs for dealing with times and dates.