util

package
v1.10.55 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 12 Imported by: 19

Documentation

Index

Constants

View Source
const (
	NL = "\n"
)

Variables

This section is empty.

Functions

func Clean

func Clean(category string) error

func CreateIfNotExist

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

func CreateTemplate

func CreateTemplate(category, name, content string) error

func FileExists

func FileExists(file string) bool

func FileNameWithoutExt

func FileNameWithoutExt(file string) string

func FindGoModPath

func FindGoModPath(dir string) (string, bool)

func FindProjectPath

func FindProjectPath(loc string) (string, bool)

func GetGoctlHome

func GetGoctlHome() (string, error)

func GetHead

func GetHead(source string) string

func GetTemplateDir

func GetTemplateDir(category string) (string, error)

func Index

func Index(slice []string, item string) int

func InitTemplates

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

func JoinPackages

func JoinPackages(pkgs ...string) string

func LoadTemplate

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

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