Documentation
¶
Index ¶
- func AddImport(file, alias, impt string) (string, error)
- func AddImportForContent(fileContent string, alias, impt string) (string, error)
- func BaseName(include, subFixToTrim string) string
- func BaseNameAndTrim(include string) string
- func CodegenCacheHome() string
- func CodegenConfigHome() string
- func CodegenHome() string
- func CodegenTemplateHome() string
- func CreateHzFile(outputDir string) error
- func GetAnnotation(input parser.Annotations, target string) []string
- func GetAnnotations(input parser.Annotations, targets map[string]string) map[string][]string
- func GetFirstKV(m map[string][]string) (string, []string)
- func GetHandlerPackageUniqueName(name string) (string, error)
- func GetMiddlewareUniqueName(name string) (string, error)
- func GetPackageUniqueName(name string) (string, error)
- func GetProtoFiles(paths []string) []string
- func GetThriftFiles(paths []string) []string
- func GetYamlFiles(paths []string) []string
- func ImportToPath(path, subFix string) string
- func ImportToPathAndConcat(path, subFix string) string
- func IsHzNew(outputDir string) bool
- func IsWindows() bool
- func PathToImport(path, subFix string) string
- func PrintlnImports(imports []Import) string
- func SplitGoTags(input string) []string
- func SplitPackage(pkg, subFixToTrim string) string
- func SplitPackageName(pkg, subFixToTrim string) string
- func SubDir(root, subPkg string) string
- func SubPackage(mod, dir string) string
- func SubPackageDir(path string) string
- func ToGoFuncName(s string) string
- func ToVarName(paths []string) string
- type Import
- type ThriftIDLCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddImportForContent ¶
func BaseNameAndTrim ¶
func CodegenCacheHome ¶
func CodegenCacheHome() string
func CodegenConfigHome ¶
func CodegenConfigHome() string
func CodegenHome ¶
func CodegenHome() string
func CodegenTemplateHome ¶
func CodegenTemplateHome() string
func CreateHzFile ¶
func GetAnnotation ¶
func GetAnnotation(input parser.Annotations, target string) []string
func GetAnnotations ¶
func GetMiddlewareUniqueName ¶
GetMiddlewareUniqueName can get a non-repeating variable name for middleware name
func GetPackageUniqueName ¶
GetPackageUniqueName can get a non-repeating variable name for package alias
func GetProtoFiles ¶
func GetThriftFiles ¶
func GetYamlFiles ¶
func ImportToPath ¶
func ImportToPathAndConcat ¶
func PathToImport ¶
func PrintlnImports ¶
func SplitGoTags ¶
func SplitPackage ¶
func SplitPackageName ¶
func SubPackage ¶
func SubPackageDir ¶
func ToGoFuncName ¶
ToGoFuncName converts a string to a function naming style for go
Types ¶
type Import ¶
func (Import) PackageName ¶
type ThriftIDLCache ¶
type ThriftIDLCache struct {
// contains filtered or unexported fields
}
func NewThriftIDLCache ¶
func NewThriftIDLCache(cu *golang.CodeUtils) *ThriftIDLCache
func (*ThriftIDLCache) AddFile ¶
func (c *ThriftIDLCache) AddFile(filename string) (*golang.Scope, error)
func (*ThriftIDLCache) GetScope ¶
func (c *ThriftIDLCache) GetScope(path string) (*golang.Scope, bool)
func (*ThriftIDLCache) GetScopeByAst ¶
func (*ThriftIDLCache) GetWaitProcessScopes ¶
func (c *ThriftIDLCache) GetWaitProcessScopes() []*golang.Scope
Click to show internal directories.
Click to hide internal directories.