Documentation ¶
Index ¶
- Constants
- Variables
- func AllValidTypeNames() []string
- func BareNameOfCsvFile(fullPath string) string
- func DirMustEmpty(dir string)
- func FileCsvRead(item string) [][]string
- func FileCsvWrite(csvFilePath string, grid [][]string)
- func FilenameByType(bareName string) string
- func FmtCsvFileNameOfCsvFile(fullPath string) string
- func FormatTypeName(typeName string) string
- func GetVariableLiteralValue(typ string, val string) string
- func GoLiteralValInt(val string) string
- func GoLiteralValIntArr(val string) string
- func GoLiteralValIntArr2d(val string) string
- func GoLiteralValStr(val string) string
- func GridDoesColumnHasValue(grid [][]string) []bool
- func GridFillColumn(grid [][]string, colCount int) [][]string
- func GridFilterColumn(grid [][]string, colHasVal []bool) [][]string
- func GridMaxColumnLen(grids [][]string) int
- func GridOmitEmptyRow(grid [][]string) [][]string
- func GridSplitHeader(grid [][]string, headerRowCount int) (headerGrid, dataGrid [][]string)
- func GridTrimCellSpace(grid [][]string) [][]string
- func IsExist(filepath string) bool
- func ListFilenameByExt(dir string, extNames ...string) []string
- func MakeSureExist(dir string)
- func NameBareName(fullPath string) string
- func NameRemoveHan(s string) string
- func NameToCamelCase(s string) string
- func NameToSnakeCase(s string) string
- func NameUpperFirstLetter(name string) string
- func RenderTemplate(outputFilePath string, tmpl *template.Template, param any)
- func RenderTemplateByFilePath(outputFilePath string, templateFilePath string, param any)
- func RowIsEmpty(row []string) bool
- type ConfigTyp
Constants ¶
View Source
const TypeB = "bool"
View Source
const TypeI = "int"
View Source
const TypeIArr = "[]int"
View Source
const TypeIArr2d = "[][]int"
View Source
const TypeMapIToI = "map[int]int"
View Source
const TypeMapIToIArr = "map[int][]int"
View Source
const TypeMapIToStr = "map[int]string"
View Source
const TypeMapIToStrArr = "map[int][]string"
View Source
const TypeMapStrToI = "map[string]int"
View Source
const TypeMapStrToIArr = "map[string][]int"
View Source
const TypeMapStrToStr = "map[string]string"
View Source
const TypeMapStrToStrArr = "map[string][]string"
View Source
const TypeStr = "string"
View Source
const TypeStrArr = "[]string"
View Source
const TypeStrArr2d = "[][]string"
Variables ¶
View Source
var TypGlobalNameMatcher = regexp.MustCompile("^[gG]lobal.*$") // global
View Source
var TypI18nNameMatcher = regexp.MustCompile(`^i18n.*$`) // i18n表
View Source
var TypNormalNameMatcher = regexp.MustCompile("^[a-z0-9]+.*$") // 普通表
Functions ¶
func BareNameOfCsvFile ¶ added in v0.0.4
func DirMustEmpty ¶
func DirMustEmpty(dir string)
func FileCsvRead ¶
func FileCsvWrite ¶
func FmtCsvFileNameOfCsvFile ¶ added in v0.0.4
func GetVariableLiteralValue ¶
func GoLiteralValInt ¶
func GoLiteralValIntArr ¶
func GoLiteralValIntArr2d ¶ added in v0.0.5
func GoLiteralValStr ¶
func GridDoesColumnHasValue ¶
GridDoesColumnHasValue 判断grid的列是否有值
func GridFillColumn ¶
GridFillColumn 填充列
func GridFilterColumn ¶
GridFilterColumn 过滤grid的列
func GridMaxColumnLen ¶
GridMaxColumnLen 返回有效grid的有效列数(不包含每行尾部的空值)
func GridSplitHeader ¶
GridSplitHeader 分裂成两个grid
func GridTrimCellSpace ¶
GridTrimCellSpace 去掉每个cell的空格
func ListFilenameByExt ¶
ListFilenameByExt 根据扩展名取文件, 扩展名不区分大小写
func MakeSureExist ¶
func MakeSureExist(dir string)
func NameBareName ¶ added in v0.0.4
func NameRemoveHan ¶ added in v0.0.4
func NameToCamelCase ¶ added in v0.0.4
NameToCamelCase converts snake_case strings to camelCase.
func NameToSnakeCase ¶ added in v0.0.4
NameToSnakeCase converts CamelCase to snake_case, avoiding consecutive underscores.
func NameUpperFirstLetter ¶ added in v0.0.4
func RenderTemplate ¶
RenderTemplate 渲染模板
func RenderTemplateByFilePath ¶
RenderTemplateByFilePath 渲染模板
Types ¶
Click to show internal directories.
Click to hide internal directories.