utils

package
v0.0.0-...-d15c49a Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func EmptyString

func EmptyString(s string) bool

EmptyString ...

func InArray

func InArray(str string, list []string) bool

InArray ...

func Message

func Message(status bool, message string, statusCode int) map[string]interface{}

Message is used to create success or failure messages

func MicroTime

func MicroTime() float64

MicroTime ...

func New

func New(h http.Handler, log *log.Logger) http.Handler

New ...

func RandomString

func RandomString(length int) string

RandomString Returns random string with specified length

func Respond

func Respond(w http.ResponseWriter, data map[string]interface{})

Respond is used to reply to HTTP request

func StrReplace

func StrReplace(search, replace, subject string) string

StrReplace

func Strip

func Strip(s string) string

Strip ..

Types

type LogRequestHandler

type LogRequestHandler struct {
	HTTPHandler http.Handler
	Log         *log.Logger
}

LogRequestHandler ...

func (LogRequestHandler) ServeHTTP

func (rh LogRequestHandler) ServeHTTP(res http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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