utils

package
v0.0.0-...-0d94b02 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BaseLogWriters = []io.Writer{&lumberjack.Logger{
	Filename:   mister.LogFile,
	MaxSize:    1,
	MaxBackups: 1,
}}

Functions

func AlphaMapKeys

func AlphaMapKeys[V any](m map[string]V) []string

func Contains

func Contains[T comparable](xs []T, x T) bool

Contains returns true if slice contains value.

func GetFileSize

func GetFileSize(path string) (int64, error)

func GetLinuxSerialDeviceList

func GetLinuxSerialDeviceList() ([]string, error)

func GetLocalIp

func GetLocalIp() (net.IP, error)

func GetMd5Hash

func GetMd5Hash(path string) (string, error)

func InitLogging

func InitLogging() error

func MapKeys

func MapKeys[K comparable, V any](m map[K]V) []K

MapKeys returns a list of all keys in a map.

func WaitForInternet

func WaitForInternet(maxTries int) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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