util

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDirIfNotExists

func CreateDirIfNotExists(path string) error

CreateDirIfNotExists

func CreateFileIfNotExists

func CreateFileIfNotExists(path string) error

CreateFileIfNotExists

func RandomStringGenerator

func RandomStringGenerator(n int) (string, error)

RandomStringGenerator returns a random string using crypto/rand lib.

func ReadJSON

func ReadJSON(w http.ResponseWriter, r *http.Request, data interface{}) error

func WriteJSON

func WriteJSON(w http.ResponseWriter, status int, data interface{}, headers ...http.Header) error

func WriteXML

func WriteXML(w http.ResponseWriter, status int, data interface{}, headers ...http.Header) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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