lib

package
v0.0.0-...-1793357 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2015 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyItem

func CopyItem(itemPath string, destination string) error

* * CopyItem copies file from source to destination

func DownloadFromGithub

func DownloadFromGithub(shorthand, branch, filePath string) ([]byte, error)

* * DownloadFromGithub retrieves a file from a github repo

func DownloadFromUrl

func DownloadFromUrl(url string) (content []byte, err error)

* * DownloadFromUrl retrives a file hosted at a URL * This works exactly as Fetch. Only exists to main consistency in * naming of remote-handling functions

func Fetch

func Fetch(url string) (content []byte, err error)

* * Fetch is a convenience wrapper for fetching data from a Url

func FilterTemplateDiretories

func FilterTemplateDiretories(paths []string, suffix string) []string

* * FilterTemplateDiretories returns a slice of paths having the suffix * passed

func GetTemplateDirectories

func GetTemplateDirectories() (paths []string, err error)

* * GetTemplateDirectories returns a slice of paths where templates * may be placed in. Note: returns an empty slice if env var $GIMME_PATH * is not set

func LocalGet

func LocalGet(paths []string, itemname string, destination string)

* * LocalGet gets a file from local file system

func LocalGetMany

func LocalGetMany(itemnames []string)

* * LocalGetMany allows passing many files to get locally

func LogError

func LogError(message ...string)

func LogNormal

func LogNormal(message ...string)

func LogRaw

func LogRaw(message ...string)

func LogSuccess

func LogSuccess(message ...string)

func RemoteGet

func RemoteGet(whichRemote string, args []string)

* * RemoteGet gets a file from a remote source

func SearchItem

func SearchItem(paths []string, searchTerm string) string

* * SearchItem looks for an item in a list of paths. Returns path to the * first matched item. Returns empty string if not found.

func TextBold

func TextBold(str string) string

func TextUnderline

func TextUnderline(str string) string

func WriteFile

func WriteFile(filename string, content []byte) (err error)

* * WriteFile writes file to disk. Also overwites the file. It is a * convenience wrapper

Types

This section is empty.

Jump to

Keyboard shortcuts

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