helpers

package
v0.0.0-...-c980814 Latest Latest
Warning

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

Go to latest
Published: May 31, 2020 License: MIT Imports: 12 Imported by: 8

Documentation

Overview

Package helpers provide various convenience functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BashEscape

func BashEscape(in string) string

BashEscape escapes various characters in bash environment.

func DefaultPGDSN

func DefaultPGDSN(dbName string) string

DefaultPGDSN generates default PostgreSQL DSN path.

func ExitOnError

func ExitOnError(err error, msg string)

ExitOnError logs error message in fatal mode.

func GetCurrentUser

func GetCurrentUser() string

GetCurrentUser returns the username of the current user.

func GetProjectTemplateDir

func GetProjectTemplateDir(projectTemplate string) (string, error)

GetProjectTemplateDir returns the path to go-bootstrap's project-templates/ directory

func GoPaths

func GoPaths() []string

GetGoPaths returns the GOPATH as an array of paths

func IsValidGoPath

func IsValidGoPath(gopath string) bool

IsValidGoPath checks if a path is part of the GOPATH

func RandString

func RandString(n int) string

RandString generates random string given n length.

func RecursiveSearchReplaceFiles

func RecursiveSearchReplaceFiles(fullpath string, replacers map[string]string) error

RecursiveSearchReplaceFiles find and replace various strings defined in replacers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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