utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToString

func BytesToString(b []byte) string

BytesToString converts byte slice to string without a memory allocation.

func Copy

func Copy(src, dest string) error

Copy copies src to dest, doesn't matter if src is a directory or a file.

func NewUUID

func NewUUID() (uuid, error)

NewUUID creates a new uuid.

func NewUUIDShort added in v0.0.7

func NewUUIDShort() (string, error)

NewUUIDShort creates a new uuid and encodes it to a short form.

func Request

func Request(method, api string, data interface{}) ([]byte, error)

Request conducts a http request for a given method, api endpoint, and data attached as application/json Content-Type.

func StringToBytes

func StringToBytes(s string) (b []byte)

StringToBytes converts string to byte slice without a memory allocation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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