Documentation ¶
Index ¶
- Constants
- func Abs(a int64) int64
- func CountAndRemoveConsecutiveDuplicates(numberList []int64) ([]int64, map[int64]int64)
- func Exists(path string) (bool, error)
- func IsIP(ip string) bool
- func Max(a int, b int) int
- func Min(a int, b int) int
- func RemoveConsecutiveDuplicates(numberList []int64) []int64
- func Round(f float64) int64
- type ByStringLength
- type SortableInt64
Constants ¶
const TimeFormat string = "2006-01-02-T15:04:05-0700"
Variables ¶
This section is empty.
Functions ¶
func CountAndRemoveConsecutiveDuplicates ¶ added in v1.0.2
CountAndRemoveConsecutiveDuplicates removes consecutive duplicates in an array of integers and counts how many instances of each number exist in the array. Similar to `uniq -c`, but counts all duplicates, not just consecutive duplicates.
func Exists ¶
* Name: Exists * Purpose: Returns true if file or directory exists, false otherwise * comments:
func IsIP ¶
* Name: IsIP * Purpose: Returns true if string is a valid IP address, false otherwise * comments:
func RemoveConsecutiveDuplicates ¶ added in v1.0.2
RemoveConsecutiveDuplicates removes consecutive duplicates in an array of integers much like the unix command `uniq`
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 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)