common

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2016 License: BSD-3-Clause Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsFolderName added in v0.3.1

func ContainsFolderName(path string, names ...string) bool

ContainsFolderName checks if path contains a name. A name will be prepended with an OS specific path separator, e.g.: .svn becomes /.svn

func FileExists added in v0.6.0

func FileExists(path string) bool

FileExists returns true if file exists

func FileSizeFromPath

func FileSizeFromPath(path string) (width, height int)

func Info added in v0.6.0

func Info(msg string, args ...interface{})

func InfoErr

func InfoErr(msg string, args ...interface{})

func InitPB added in v0.4.0

func InitPB(count int) *pb.ProgressBar

InitPB initializes a progress bar for the terminal

func IsDir added in v0.4.0

func IsDir(path string) bool

IsDir returns true if path is a directory

func IsHTTP added in v0.4.0

func IsHTTP(path string) bool

IsHTTP checks if path starts with http or https

func IsImage

func IsImage(path string) (ok bool)

IsImage checks if path to a file is an image by extracting the file extension and checking it against an internal list.

func TempDir added in v0.4.0

func TempDir() string

TempDir returns temporary directory ending with a path separatoe

func UsageAndExit

func UsageAndExit(message string, args ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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