utils

package
v0.0.0-...-8f783ef Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogPanic = iota
	LogFatal
	LogError
	LogWarning
	LogInfo
	LogDebug
	LogTrace
)

Variables

This section is empty.

Functions

func HaversineDist

func HaversineDist(x []float64, y []float64) float64

func LogErrorWithLevel

func LogErrorWithLevel(err error, level uint) bool

LogErrorWithLevel logs error with severity if not nil

func ParseLocation

func ParseLocation(location string) ([2]float64, error)

func Permutations

func Permutations(nums []int, res *[][]int, start int)

Permutations does not consider duplication in input number list

func ReadFromFile

func ReadFromFile(fileName string, ptr interface{}) error

Types

type Error

type Error struct {
	Err   error
	Level uint
}

func (Error) Error

func (error Error) Error() (res string)

Jump to

Keyboard shortcuts

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