Documentation ¶
Index ¶
- func AddFieldToStruct(filePath string, structName string, fieldName string, fieldTypeAndTags string) (string, error)
- func AddImportPackage(filePath string, packagePath string) (string, error)
- func AddLineToEndOfBlock(filePath string, blockStart string, blockEnd string, addLine string, ...) (string, error)
- func AddRepositorySetFieldMethod(repositoryFilePath string, method string, toCheck 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 FindContentBetweenStartAndEnd(s string, startStr string, endStr string) (string, error)
- func FindContentWithStartAndEnd(s string, startStr string, endStr string) (string, error)
- func FindMethod(filePath string, receiver string, methodParamName string, methodName string) (string, error)
- func FindServiceName(projectAbsDir string) (string, error)
- func FindStruct(filePath string, structName string) (string, error)
- func FindUrlPrefix(projectAbsDir 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 ParseTemplate(templateName string, templateStr string, conf interface{}) (string, error)
- func ParseTemplateFile(inputFilePath string, conf interface{}) (string, error)
- func PathExists(path string) bool
- func Plural(s string) string
- func RenameStruct(filePath string, oldStructName string, newStructName string, removeTags bool) (string, error)
- func RunCommand(name string, args ...string) error
- func SnakeCase(s string) string
- func StringBetween(content string, startStr string, endStr string) (startIndex int, num int, newContent string, betweenContent string)
- func UpperShort(s string) string
- type StructField
- type SwaggerParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFieldToStruct ¶ added in v0.1.9
func AddImportPackage ¶ added in v0.1.11
func AddLineToEndOfBlock ¶ added in v0.1.11
func CheckError ¶
func DeleteContentWithPrefixAndSuffix ¶ added in v0.1.7
func FindAPISwagger ¶ added in v0.1.12
func FindContentBetweenStartAndEnd ¶ added in v0.1.7
func FindContentWithStartAndEnd ¶ added in v0.1.7
func FindMethod ¶ added in v0.1.12
func FindServiceName ¶ added in v0.1.5
func FindStruct ¶ added in v0.1.6
func FindUrlPrefix ¶ added in v0.1.4
func GetDirFiles ¶
func GetRepositoryFilePath ¶
func GetRootPackageName ¶
func IDDTOJSONCase ¶
func IDParamsCase ¶ added in v0.1.11
func LoadYAMLFile ¶
func ParseTemplate ¶
func ParseTemplateFile ¶
func PathExists ¶
func RenameStruct ¶ added in v0.1.11
func RunCommand ¶
func StringBetween ¶
func UpperShort ¶ added in v0.1.11
Types ¶
type StructField ¶ added in v0.1.11
func FindStructFields ¶ added in v0.1.11
func FindStructFields(filePath string, structName string) ([]StructField, error)
type SwaggerParams ¶ added in v0.1.10
func FindAPISwaggerParams ¶ added in v0.1.10
func FindAPISwaggerParams(filePath string, functionName string) ([]SwaggerParams, error)
Click to show internal directories.
Click to hide internal directories.