boilerplate

package module
v0.0.0-...-f7b8d63 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2016 License: GPL-2.0 Imports: 5 Imported by: 4

README

boilerplate

Collection of Go/Golang Boilerplate code and other useful things

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFileIfMissing

func CreateFileIfMissing(filename string)

CreateFileIfMissing creates a file if it does not exist

func DownloadRemoteFile

func DownloadRemoteFile(destination, remoteAdress string)

DownloadRemoteFile downloads a remote file via a remote adress

func EliminateDuplicates

func EliminateDuplicates(theStrings []string) []string

EliminateDuplicates eliminates duplicates in a given slice of strings

func EliminateStringInSlice

func EliminateStringInSlice(theStrings []string, deadString string) []string

EliminateStringInSlice eliminates all duplicates of a specific string

func FailError

func FailError(err error)

FailError panics if an Error occured

func FileExists

func FileExists(path string) bool

FileExists tests if a file exists

func GetFilesInDir

func GetFilesInDir(path string) []string

GetFilesInDir returns names of all files at given path

func GotError

func GotError(err error) bool

GotError true if an Error occured

func PrintStringSlice

func PrintStringSlice(theStrigSlice []string, doPrint bool)

PrintStringSlice is a debug funktion to display content of arrays with unknown size

func StringAtIndex

func StringAtIndex(index int, slice []string) string

StringAtIndex returns string at index or an empty string if none is found

func StringInSlice

func StringInSlice(theSlice []string, item string) bool

StringInSlice checks if string is element in given slice

Types

type Download

type Download struct {
	Filename string
	URL      string
}

Download represents a downloadable file

Jump to

Keyboard shortcuts

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