tools

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConcurrentAction

func ConcurrentAction(maxConcurrent uint, action func(interface{}) (interface{}, error)) (chan<- interface{}, <-chan interface{}, <-chan *Error)

ConcurrentAction create a pool of goroutines for executing action with concurrency limits

func GetID

func GetID(r *http.Request) string

GetID return ID of URL (first section between two slashes)

func IncludesString

func IncludesString(array []string, lookup string) bool

IncludesString checks in an array includes given string

func IsRoot

func IsRoot(r *http.Request) bool

IsRoot checks if current path is root (empty or only trailing slash)

func Sha1

func Sha1(o interface{}) string

Sha1 return SHA1 fingerprint

func ToCamel

func ToCamel(s string) string

ToCamel change first letter to lowerCase

Types

type Error

type Error struct {
	Input interface{}
	Err   error
}

Error contains ID in error and error desc

Jump to

Keyboard shortcuts

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