common

package
v0.0.0-...-3a05b22 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenInterface

func GenInterface(interfaceSuffix string, c plugin.CodeWriter, needInterfaceStructInfos []*markers.TypeInfo, root *loader.Package)

func GenProxyStruct

func GenProxyStruct(proxySuffix string, c plugin.CodeWriter, needProxyStructInfos []*markers.TypeInfo, root *loader.Package, debugMode bool)

func MatchFunctionByStructName

func MatchFunctionByStructName(functionSignature, structName string) (string, bool)

func ToFirstCharLower

func ToFirstCharLower(input string) string

func ToFirstCharUpper

func ToFirstCharUpper(s string) string

Types

type Method

type Method struct {
	Name      string
	Body      string // like '(name, param *substruct.Param) (string, error)'
	ParamBody string // like 'name, param *substruct.Param'
	// contains filtered or unexported fields
}

func ParseExportedMethodInfoFromGoFiles

func ParseExportedMethodInfoFromGoFiles(structName string, goFilesPath []string) []Method

ParseExportedMethodInfoFromGoFiles parse all Upper case methods,

func (*Method) GetImportAlias

func (m *Method) GetImportAlias() []string

func (*Method) GetParamValues

func (m *Method) GetParamValues() string

func (*Method) ReturnValueNum

func (m *Method) ReturnValueNum() int

func (*Method) SwapAliasMap

func (m *Method) SwapAliasMap(swapMap map[string]string)

Jump to

Keyboard shortcuts

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