util

package
v0.0.0-...-01eed2d Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExtensionByMimeOrBytes

func GetExtensionByMimeOrBytes(mime string, bytes []byte) string

GetExtensionByMimeOrBytes returns the extension by the given mime, or if that fails, by the given bytes.

func LogIfErr

func LogIfErr(prefix string, err error)

LogIfErr logs the given err with the given prefix if err is not nil.

func LogMessage

func LogMessage(time time.Time, from, to, message string)

LogMessage logs the given chat message to the log.

func Plural

func Plural(count int, singular, plural string) string

Plural returns singular if count is ±1, plural otherwise.

Types

This section is empty.

Jump to

Keyboard shortcuts

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