functions

package module
v0.0.0-...-0e8a65c Latest Latest
Warning

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

Go to latest
Published: May 20, 2017 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	VERSION = "1.1.0"
)

Variables

View Source
var (
	Bold = func(content string) (template.HTML, error) {
		return template.HTML("<b>" + content + "</b>"), nil
	}
	Italic = func(content string) (template.HTML, error) {
		return template.HTML("<i>" + content + "</i>"), nil
	}
	Underline = func(content string) (template.HTML, error) {
		return template.HTML("<u>" + content + "</u>"), nil
	}
)

Functions

func CopyFile

func CopyFile(src, dst string) (err error)

func CreateDirIfNotExist

func CreateDirIfNotExist(dir string) error

func Decrypt

func Decrypt(key []byte, b64 string) string

func Encrypt

func Encrypt(key, text []byte) string

func Exists

func Exists(path string) bool

func GetFilenameNoExtension

func GetFilenameNoExtension(s string) string

func LeftPad

func LeftPad(s string, padStr string, pLen int) string

func LeftPad2Len

func LeftPad2Len(s string, padStr string, overallLen int) string

func MakeTimestamp

func MakeTimestamp() int64

func Parallel

func Parallel(n int, fn func())

Parallel runs a given function n times concurrently NOTE: Please set runtime.GOMAXPROCS to runtime.NumCPU() for best performance

func RemoveDuplicates

func RemoveDuplicates(a []string) []string

func RemoveFileIfExist

func RemoveFileIfExist(filename string) error

func RightPad

func RightPad(s string, padStr string, pLen int) string

func RightPad2Len

func RightPad2Len(s string, padStr string, overallLen int) string

func Unzip

func Unzip(archive, target string) error

func Zipit

func Zipit(source, target string) error

Types

This section is empty.

Directories

Path Synopsis
cisco
aci
ucs
echo
Package LFShook allows users to write to the logfiles using logrus.
Package LFShook allows users to write to the logfiles using logrus.
middleware
Package now is a time toolkit for golang.
Package now is a time toolkit for golang.
Package gorequest inspired by Nodejs SuperAgent provides easy-way to write http client
Package gorequest inspired by Nodejs SuperAgent provides easy-way to write http client
Package scheduler is a cron replacement based on: http://adam.herokuapp.com/past/2010/4/13/rethinking_cron/ and https://github.com/dbader/schedule Uses include: func main() { job := func() { fmt.Println("Time's up!") } scheduler.Every(5).Seconds().Run(function) scheduler.Every().Day().Run(function) scheduler.Every().Sunday().At("08:30").Run(function) }
Package scheduler is a cron replacement based on: http://adam.herokuapp.com/past/2010/4/13/rethinking_cron/ and https://github.com/dbader/schedule Uses include: func main() { job := func() { fmt.Println("Time's up!") } scheduler.Every(5).Seconds().Run(function) scheduler.Every().Day().Run(function) scheduler.Every().Sunday().At("08:30").Run(function) }
Package spin provides a very simple spinner for cli applications.
Package spin provides a very simple spinner for cli applications.
vcr

Jump to

Keyboard shortcuts

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