util

package
v0.0.0-...-5a7003e Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelToLowerCamel

func CamelToLowerCamel(s string) string

func Copy

func Copy(source, target, exclude string) (out []byte, err error)

func CreateFile

func CreateFile(path string) (*os.File, error)

func CreateFileContent

func CreateFileContent(path, data string) (err error)

func ExecuteTemplate

func ExecuteTemplate(t *template.Template, path string, m interface{})

func ExecuteTemplateBase

func ExecuteTemplateBase(t *template.Template, path string, m interface{}, before func([]byte) []byte)

func ExecuteTemplateConf

func ExecuteTemplateConf(temps []TemplateConfig)

func GetTemplate

func GetTemplate(t string) (tmpl *template.Template)

func GetTemplateByPath

func GetTemplateByPath(path string) *template.Template

func MkdirAll

func MkdirAll(path string) error

func PathExists

func PathExists(path string) (bool, error)

func ReadAll

func ReadAll(filePth string) ([]byte, error)

Types

type TemplateConfig

type TemplateConfig struct {
	SourcePath string
	TargetPath string
	Data       map[string]interface{}
	AfterFunc  func(i []byte) []byte
}

Jump to

Keyboard shortcuts

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