tools

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2019 License: MIT Imports: 10 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 ConcurentOutput)

ConcurrentAction create a pool of goroutines for executing action with concurrency limits (default to NumCPU)

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 ConcurentOutput added in v1.7.0

type ConcurentOutput struct {
	Input  interface{}
	Output interface{}
	Err    error
}

ConcurentOutput contains input, output and error from action

Jump to

Keyboard shortcuts

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