utils

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2020 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckOverflow

func CheckOverflow(m map[string]interface{}, ctx string) error

CheckOverflow enforce m to be empty. Usefull to detect unknown fields.

func FetchURL

func FetchURL(ctx context.Context, logger log.Logger, u *url.URL) ([]byte, error)

FetchURL return body of a fetched url.URL

func PrepareURL

func PrepareURL(schemeHost string, path string, params map[string]string) (*url.URL, error)

PrepareURL return an url.URL from it's parameters

func TruncateString added in v0.4.0

func TruncateString(str string, length int) string

TruncateString truncate the string after at most length characters

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL