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: 2 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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