utility

package
v0.0.0-...-d40f389 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const HTTPClientTimeout = time.Duration(1) * time.Second

Variables

This section is empty.

Functions

func DecodeToStruct

func DecodeToStruct[T any](s []byte) (T, error)

func EncodeToBytes

func EncodeToBytes(p interface{}) ([]byte, error)

func Fetch

func Fetch(url, method string, payload *bytes.Buffer) ([]byte, error)

func FormatDuration

func FormatDuration(d time.Duration) string

func JSONFetch

func JSONFetch(url, method string, payload *bytes.Buffer) (any, error)

func Pretty

func Pretty(data interface{}) string

func PrintPretty

func PrintPretty(data interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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