Documentation ¶
Index ¶
- Constants
- func Clone(s, t interface{}) (interface{}, error)
- func CreateDirectoryIfNotExist(fullpath string) (err error)
- func DbSize(tx gorp.SqlExecutor, dbName string) (string, error)
- func DirectoryExists(fullpath string) (ok bool)
- func Encrypt(text string) (result string)
- func FileDaysOld(f *os.FileInfo) int
- func FormatCurrency(n float64) string
- func FormatCurrencyZero(n float64) string
- func FormatDate(d *time.Time) string
- func FormatDateTime(d *time.Time) string
- func FormatFloat(n float64) string
- func FormatInt(n float64) string
- func FormatPercent(n float64) string
- func FormatPercentWithZeroes(n float64) string
- func GetPackageFullPath(name string) (result string, err error)
- func ParseBaseUrl(urlAddress string) (parsed string, err error)
- func ProcessDirectoryContents(fullpath string, recursive bool, fn FileLambda, level int) (err error)
- func RenderFloat(format string, n float64) string
- func RenderInteger(format string, n int) string
- func Split(text string, sep string) []string
- func SplitUnique(text string, sep string) []string
- func TableToText(headers, body []string, separator string) (string, error)
- func TruncMs(d *time.Time, loc *time.Location)
- func TruncMsUTC(d *time.Time)
- func UUID() string
- func Unzip(archive, target string) error
- func Zip(source, target string) error
- type DbTableInfo
- type FileInfo
- type FileLambda
- type Subdirectory
Constants ¶
View Source
const ( DATE_FORMAT = "02-01-2006" DATE_TIME_FORMAT = "02-01-2006 15:04" )
fixed date formats
View Source
const (
DEFAULT_PERMISSION = 0777
)
Variables ¶
This section is empty.
Functions ¶
func CreateDirectoryIfNotExist ¶
Verifies if the directory already exists, if it does not then it is created
func DirectoryExists ¶
Returns true if the directory exists
func FileDaysOld ¶
func FormatCurrency ¶
func FormatCurrencyZero ¶
func FormatDate ¶
func FormatDateTime ¶
func FormatFloat ¶
func FormatPercent ¶
func FormatPercentWithZeroes ¶
func GetPackageFullPath ¶
Devuelve la ruta local de un package de go
func ParseBaseUrl ¶
Devuelve la url base de una direccion http o https
func ProcessDirectoryContents ¶
func ProcessDirectoryContents(fullpath string, recursive bool, fn FileLambda, level int) (err error)
Reads a directory content recursively and process the lambda code inside
func RenderFloat ¶
func RenderInteger ¶
func SplitUnique ¶
func TableToText ¶
given an array of cells, return as formatted text each element of body is a row and each cell has a separator
func TruncMsUTC ¶
Types ¶
type DbTableInfo ¶
func TablesInfo ¶
func TablesInfo(tx gorp.SqlExecutor) (items []DbTableInfo, err error)
type FileLambda ¶
type Subdirectory ¶
type Subdirectory struct { Name string `json:"name"` FileCount int64 `json:"fileCount"` Bytes int64 `json:"bytes"` }
func SubdirectoriesInfo ¶
func SubdirectoriesInfo(root string) (dirs []*Subdirectory, err error)
Click to show internal directories.
Click to hide internal directories.