utils

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteToString

func ByteToString(b int64) string

ByteToString converts file sizes (in integer) to readable strings.

func CheckError

func CheckError(err error)

CheckError is a rough error-handling method.

func GuessType

func GuessType(filename string) string

GuessType guesses the MIME type of a given file.

func IsDir

func IsDir(filePath string) bool

IsDir determines if a path is a directory.

func IsSourceCode

func IsSourceCode(filename string) (bool, string)

IsSourceCode determines if a file is a source code file based on its extension (and filename).

func LocalIPs added in v1.0.4

func LocalIPs() []string

LocalIPs return all local IP addresses in 192.168.0.0/16.

Types

This section is empty.

Jump to

Keyboard shortcuts

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