util

package
v1.1.16 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(src string, dst string, template bool) error

Copy copies the the src directory recursively to the destination directory. If template is true files ending in '.template' will be templated and copied to the destination directory with the .template suffix removed. The context for templating is the current environment.

credit https://gist.github.com/r0l1/92462b38df26839a3ca324697c8cba04

func CopyFile

func CopyFile(src, dst string) error

CopyFile copies the specified source file to the specified destination.

credit https://gist.github.com/r0l1/92462b38df26839a3ca324697c8cba04

func Env

func Env() map[string]string

Env returns the current environment as map.

func TemplateFile

func TemplateFile(templateFile string, destFile string, context map[string]string) error

TemplateFile templates the specified file and writes it to the specified destination.

Types

This section is empty.

Jump to

Keyboard shortcuts

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