utils

package
v0.0.0-...-cf68769 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMimeTypeByFileExt

func GetMimeTypeByFileExt(url string) string

GetMimeTypeByFileExt returns a file's mime type based on the file extension (.jpg,.png, etc)

func Round

func Round(val float64, roundOn float64, places int) (newVal float64)

Round will round floats to the nearest value

func SafeCastToString

func SafeCastToString(v interface{}) string

SafeCastToString safely casts an interface to a string, otherwise it will return an empty string

Types

This section is empty.

Jump to

Keyboard shortcuts

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