utils

package
v0.0.0-...-d7b753e Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2019 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BoundaryChars  = "-_1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
	BoundaryLength = 30
)

Variables

View Source
var DefaultTempPath = ""

Functions

func CreateFolder

func CreateFolder(folderPath string) error

func CreateTempFile

func CreateTempFile(outputDir string, namePrefix *string) (f *os.File, err error)

func FileGetContents

func FileGetContents(path string) (content string, err error)

func FileOrFolderExists

func FileOrFolderExists(filePath string) bool

func GenerateUploadId

func GenerateUploadId(useNano bool) (result string)

func GenerateUserBreadCrumb

func GenerateUserBreadCrumb(size int) string

func GetFileSize

func GetFileSize(filePath string) (size int64, err error)

func GetImageDimension

func GetImageDimension(imagePath string) (width int, height int, err error)

func GetImageOrientation

func GetImageOrientation(imagePath string) (orientation string, err error)

func GuessImageFormat

func GuessImageFormat(filePath string) (format string, err error)

func HashCode

func HashCode(data string) int

func IsDirectory

func IsDirectory(filePath string) bool

func MicroTime

func MicroTime() float64

func MtRand

func MtRand(min, max int64) int64

func NumberFormat

func NumberFormat(number float64, decimals uint, decPoint, thousandsSep string) string

func Realpath

func Realpath(fpath string) (string, error)

func RemoveDirectory

func RemoveDirectory(filePath string) bool

func ReorderByHashCode

func ReorderByHashCode(data map[string]interface{})

func SaveImage

func SaveImage(path string, img image.Image) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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