Documentation ¶
Index ¶
- Constants
- Variables
- func Abs(a int64) int64
- func AvgMaxPos(vals []float64) (avg float64, max float64, maxPos float64)
- func Exists(path string) (bool, error)
- func IsIP(ip string) bool
- func IsLoopback(ip string) bool
- func IsSpecialIP(ip string) bool
- func IsURL(str string) bool
- func Max(a int, b int) int
- func Mean(numList []float64) float64
- func Min(a int, b int) int
- func RFC1918(ip string) bool
- func RemoveSortedDuplicates(sortedIn []int64) []int64
- func Round(f float64) int64
- func StdDev(numList []float64) float64
- func TypeConvert(m interface{}, desiredType reflect.Kind) (interface{}, int)
- func ValidIP(ip string) bool
- func Variance(numList []float64) float64
- type ByStringLength
- type Cache
- type SortableInt64
Constants ¶
View Source
const (
BSONFAIL = "FAIL"
)
BSONFAIL is a bson.ObjectId failure indicator
View Source
const TimeFormat string = "2006-01-02-T15:04:05-0700"
View Source
const URL string = `` /* 322-byte string literal not displayed */
Variables ¶
View Source
var BAD = -1
View Source
var GOOD = 0
Functions ¶
func AvgMaxPos ¶
UNUSED AvgMaxPos calculating mean (average), maximum value, and position of max value in a data set
func Exists ¶
UNUSED
- Name: Exists
- Purpose: Returns true if file or directory exists, false otherwise
- comments:
func IsIP ¶
UNUSED
- Name: IsIP
- Purpose: Returns true if string is a valid IP address, false otherwise
- comments:
func IsLoopback ¶
UNUSED
- Name: IsLoopback
- Purpose: Returns true if string is a valid IP address, false otherwise
- comments:
func IsSpecialIP ¶
UNUSED IsSpecialIP attempts to filter some IPs that we don't care about
func RemoveSortedDuplicates ¶ added in v1.0.0
given a sorted slice, remove the duplicates
func StdDev ¶
UNUSED StdDev calculating the standard deviation (quantified amount of variation or dispersion) of a data set
Types ¶
type ByStringLength ¶
type ByStringLength []string
ByStringLength Functions that, in combination with golang sort, allow users to sort a slice/list of strings by string length (shortest -> longest)
func (ByStringLength) Len ¶
func (s ByStringLength) Len() int
func (ByStringLength) Less ¶
func (s ByStringLength) Less(i, j int) bool
func (ByStringLength) Swap ¶
func (s ByStringLength) Swap(i, j int)
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a simple cache mechanism to avoid db lookups
type SortableInt64 ¶
type SortableInt64 []int64
SortableInt64 functions that allow a golang sort of int64s
func (SortableInt64) Len ¶
func (s SortableInt64) Len() int
func (SortableInt64) Less ¶
func (s SortableInt64) Less(i, j int) bool
func (SortableInt64) Swap ¶
func (s SortableInt64) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.