util

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDir

func CreateDir(dir string) error

CreateDir Creates a directory if it doesn't exist

func FileExists

func FileExists(file string) bool

FileExists returns true if the dir exists on filesystem

func WhereAmI

func WhereAmI() string

WhereAmI returns the current source file name from the root of the project

Types

type Duration

type Duration time.Duration

Duration wraps time.Duration to provide Round method

func (Duration) Round

func (d Duration) Round(r time.Duration) time.Duration

Round Rounds d to the closest r unit

type FileInfoBySizeDesc

type FileInfoBySizeDesc []os.FileInfo

FileInfoBySizeDesc implementats a sort by size on os.FileInfo

func (FileInfoBySizeDesc) Len

func (s FileInfoBySizeDesc) Len() int

func (FileInfoBySizeDesc) Less

func (s FileInfoBySizeDesc) Less(i, j int) bool

func (FileInfoBySizeDesc) Swap

func (s FileInfoBySizeDesc) Swap(i, j int)

Jump to

Keyboard shortcuts

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