Categorygithub.com/faryon93/util
modulepackage
1.1.0
Repository: https://github.com/faryon93/util.git
Documentation: pkg.go.dev

# README

Util

Documentation Go Report Card

A set of frequently used Go utility functions.

# download library
$: go get github.com/faryon93/util

# place on top of your go file
import "github.com/faryon93/util"

# Functions

GetHostname return the Host Header of an http request.
GetRemoteAddr returns the remote address of an http request.
IsAlphaNum returns true if the given string is composed of letters and digits only.
Jsonify writes the JSON representation of v to the supplied http.ResposeWriter.
ParseBody reads the body of the request and parses it into v.
RandomString string returns a random string with the length n.
ReadRSAPemKey read the PEM encoded RSA private key from the filesystem.
SaveRequestBody saves the body of a request in order to restore it later.
StripPort removes the port (:XXXXX) part of a hostname.
WaitSignal blocks until one of the given OS signals occoures.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author

# Structs

RequestBody represents the body of a request which was saved with SaveRequestBody().

# Type aliases

FlagArray is a type which could be used with the flag package, to obtain a list from multiple flags with the same name but different values.