Documentation ¶
Index ¶
- func AddFieldToStruct(filePath string, structName string, fieldName string, fieldTypeAndTags string) (string, string, error)
- func AddImportPackage(filePath string, packagePath string) (string, string, error)
- func AddLineToEndOfBlock(filePath string, blockStart string, blockStartLabel string, ...) (string, error)
- func AddLineToEndOfBraceBlock(filePath string, blockStart string, addLine string, addLineExistKey string) (string, error)
- func AddLineToEndOfParenthesesBlock(filePath string, blockStart string, addLine string, addLineExistKey string) (string, error)
- func AddRepositorySetFieldMethod(repositoryFilePath string, method string, toCheck string) error
- func AddRouterItem(filePath string, router string, routerUrl string, routerItem string) (string, string, error)
- func AddToFunctionEnd(filePath string, functionName string, addContent string) (string, string, error)
- func CheckError(err error, replaceError func(originErr error) error)
- func CopyFile(srcFile string, dstFile string) error
- func DeleteContentWithPrefixAndSuffix(s string, prefix string, suffix string) (string, error)
- func FindAPISwagger(filePath string, functionName string) (string, error)
- func FindBetweenStartAndEndFile(filePath string, startStr string, endStr string) (string, error)
- func FindBetweenStartAndEndFileLast(filePath string, startStr string, endStr string) (string, error)
- func FindBlock(filePath string, blockStart string, blockStartLabel string, ...) (string, error)
- func FindBlockLast(filePath string, blockStart string, blockStartLabel string, ...) (string, error)
- func FindBraceBlock(filePath string, blockStart string) (string, error)
- func FindBraceBlockLast(filePath string, blockStart string) (string, error)
- func FindContentBetweenStartAndEnd(s string, startStr string, endStr string) (string, error)
- func FindContentBetweenStartAndEndLast(s string, startStr string, endStr string) (string, error)
- func FindContentWithStartAndEnd(s string, startStr string, endStr string) (string, error)
- func FindContentWithStartAndEndLast(s string, startStr string, endStr string) (string, error)
- func FindMethod(filePath string, receiver string, methodParamName string, methodName string) (string, error)
- func FindParenthesesBlock(filePath string, blockStart string) (string, error)
- func FindParenthesesBlockLast(filePath string, blockStart string) (string, error)
- func FindServiceName(projectAbsDir string) (string, error)
- func FindStruct(filePath string, structName string) (string, error)
- func FindUrlPrefix(projectAbsDir string) (string, error)
- func FindWithStartAndEndFile(filePath string, startStr string, endStr string) (string, error)
- func FindWithStartAndEndFileLast(filePath string, startStr string, endStr string) (string, error)
- func GetDirFiles(dir string) ([]string, error)
- func GetRepositoryFilePath(projectAbsDir string, entityName string) string
- func GetRootPackageName(projectAbsDir string) (string, error)
- func HasBlank(str ...string) bool
- func IDDTOJSONCase(s string) string
- func IDParamsCase(s string) string
- func LeftLower(s string) string
- func LeftUpper(s string) string
- func LoadYAMLFile(yamlFilePath string, conf interface{}) error
- func ParseTemplateFile(inputFilePath string, outputFilePath string, conf interface{}) error
- func ParseTemplateFileToString(inputFilePath string, conf interface{}) (string, error)
- func ParseTemplateStringAppendToFile(tplName string, tplContent string, outputFilePath string, conf interface{}) error
- func ParseTemplateStringToFile(tplName string, tplContent string, outputFilePath string, conf interface{}) error
- func ParseTemplateToString(templateName string, templateStr string, conf interface{}) (string, error)
- func ParseTemplatesDir(templatesDir string, outputDir string, conf interface{}) error
- func PathExists(path string) bool
- func Plural(s string) string
- func RenameStruct(filePath string, oldStructName string, newStructName string, removeTags bool) (string, error)
- func ReplaceFileContent(filePath string, originContent string, newContent string) error
- func RunCommand(name string, args ...string) error
- func SnakeCase(s string) string
- func UpperShort(s string) string
- type StructField
- type SwaggerParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFieldToStruct ¶
func AddImportPackage ¶
func AddLineToEndOfBlock ¶
func AddLineToEndOfParenthesesBlock ¶ added in v0.1.2
func AddRouterItem ¶ added in v0.1.3
func AddToFunctionEnd ¶ added in v0.1.2
func CheckError ¶
func FindBetweenStartAndEndFileLast ¶ added in v0.1.3
func FindBlockLast ¶ added in v0.1.3
func FindBraceBlockLast ¶ added in v0.1.3
func FindContentBetweenStartAndEndLast ¶ added in v0.1.3
func FindContentWithStartAndEndLast ¶ added in v0.1.3
func FindMethod ¶
func FindParenthesesBlock ¶ added in v0.1.2
func FindParenthesesBlockLast ¶ added in v0.1.3
func FindServiceName ¶
func FindUrlPrefix ¶
func FindWithStartAndEndFile ¶
func FindWithStartAndEndFileLast ¶ added in v0.1.3
func GetDirFiles ¶
func GetRepositoryFilePath ¶
func GetRootPackageName ¶
func IDDTOJSONCase ¶
func IDParamsCase ¶
func LoadYAMLFile ¶
func ParseTemplateFile ¶
func ParseTemplateToString ¶
func ParseTemplatesDir ¶
func PathExists ¶
func RenameStruct ¶
func ReplaceFileContent ¶
func RunCommand ¶
func UpperShort ¶
Types ¶
type StructField ¶
func FindStructFields ¶
func FindStructFields(filePath string, structName string) ([]StructField, error)
type SwaggerParams ¶
func FindAPISwaggerParams ¶
func FindAPISwaggerParams(filePath string, functionName string) ([]SwaggerParams, error)
Click to show internal directories.
Click to hide internal directories.