util

package
v1.0.29 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NL = "\n"
)

Variables

This section is empty.

Functions

func Clean added in v1.0.22

func Clean(category string) error

func CreateIfNotExist

func CreateIfNotExist(file string) (*os.File, error)

func CreateTemplate added in v1.0.22

func CreateTemplate(category, name, content string) error

func FileExists

func FileExists(file string) bool

func FileNameWithoutExt

func FileNameWithoutExt(file string) string

func FindGoModPath added in v1.0.7

func FindGoModPath(dir string) (string, bool)

func GetGoctlHome added in v1.0.29

func GetGoctlHome() (string, error)

func GetHead added in v1.0.7

func GetHead(source string) string

func GetTemplateDir added in v1.0.22

func GetTemplateDir(category string) (string, error)

func InitTemplates added in v1.0.22

func InitTemplates(category string, templates map[string]string) error

func JoinPackages

func JoinPackages(pkgs ...string) string

func LoadTemplate added in v1.0.22

func LoadTemplate(category, file, builtin string) (string, error)

func MkdirIfNotExist

func MkdirIfNotExist(dir string) error

func PathFromGoSrc

func PathFromGoSrc() (string, error)

func RemoveIfExist

func RemoveIfExist(filename string) error

func RemoveOrQuit

func RemoveOrQuit(filename string) error

func Title

func Title(s string) string

func Untitle

func Untitle(s string) string

func With added in v1.0.7

func With(name string) *defaultTemplate

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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