fragment_utils

package module
v0.1.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

README

fragment-utils

Fragment编写工具包

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelCase

func CamelCase(s string) string

func CheckError

func CheckError(err error, replaceError func(originErr error) error)

func CopyFile

func CopyFile(srcFile string, dstFile string) error

func GetDirFiles

func GetDirFiles(dir string) ([]string, error)

func GetRootPackageName

func GetRootPackageName(projectAbsDir string) (string, error)

func HasBlank

func HasBlank(str ...string) bool

func IDDTOJSONCase

func IDDTOJSONCase(s string) string

func LeftLower

func LeftLower(s string) string

func LeftUpper

func LeftUpper(s string) string

func LoadYAMLFile

func LoadYAMLFile(yamlFilePath string, conf interface{}) error

func ParseTemplate

func ParseTemplate(inputFilePath string, conf interface{}) (string, error)

func ParseTemplateFile

func ParseTemplateFile(inputFilePath string, outputFilePath string, conf interface{}) error

func ParseTemplateFileAppendToFile

func ParseTemplateFileAppendToFile(inputFilePath string, outputFilePath string, conf interface{}) error

func ParseTemplatesDir

func ParseTemplatesDir(templatesDir string, outputDir string, conf interface{}) error

func PathExists

func PathExists(path string) bool

func Plural

func Plural(s string) string

func RunCommand

func RunCommand(name string, args ...string) error

func SnakeCase

func SnakeCase(s string) string

func StringBetween

func StringBetween(content string, startStr string, endStr string) (startIndex int, num int,
	newContent string, betweenContent string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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