tool

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: AGPL-3.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Byte  = 1
	KByte = Byte * 1024
	MByte = KByte * 1024
	GByte = MByte * 1024
	TByte = GByte * 1024
	PByte = TByte * 1024
	EByte = PByte * 1024
)

Variables

This section is empty.

Functions

func FileSize

func FileSize(s int64) string

FileSize calculates the file size and generate user-friendly string.

func IsImageFile

func IsImageFile(data []byte) bool

func IsKeyInArray

func IsKeyInArray(array []string, key string) bool

func IsPDFFile

func IsPDFFile(data []byte) bool

func IsReadmeFile

func IsReadmeFile(name string) bool

IsReadmeFile reports whether name looks like a README file based on its extension.

func IsTextFile

func IsTextFile(data []byte) bool

IsTextFile returns true if file content format is plain text or empty.

func IsVideoFile

func IsVideoFile(data []byte) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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