Documentation ¶
Index ¶
- Constants
- func AdoptHz(gen *protogen.Plugin) error
- func AdoptKitex(gen *protogen.Plugin) error
- func BaseName(include, subFixToTrim string) string
- func GetGOPATH() (string, error)
- func ImportToPath(path, subFix string) string
- func ImportToPathAndConcat(path, subFix string) string
- func IsWindows() bool
- func PathToImport(path, subFix string) string
- func SearchGoMod(cwd string) (moduleName, path string, found bool)
- type HzAdopter
- type KitexAdopter
Constants ¶
View Source
const KitexGenPath = "kitex_gen"
Variables ¶
This section is empty.
Functions ¶
func AdoptKitex ¶
func ImportToPath ¶
func ImportToPathAndConcat ¶
func PathToImport ¶
func SearchGoMod ¶
SearchGoMod searches go.mod from the given directory (which must be an absolute path) to the root directory. When the go.mod is found, its module name and path will be returned.
Types ¶
type HzAdopter ¶
func (*HzAdopter) ModifyGoPackage ¶
func (ad *HzAdopter) ModifyGoPackage(req *pluginpb.CodeGeneratorRequest)
func (*HzAdopter) SetGoModule ¶
func (ad *HzAdopter) SetGoModule()
type KitexAdopter ¶
func (*KitexAdopter) Init ¶
func (ad *KitexAdopter) Init() error
func (*KitexAdopter) ModifyGoPackage ¶
func (ad *KitexAdopter) ModifyGoPackage(req *pluginpb.CodeGeneratorRequest) error
Click to show internal directories.
Click to hide internal directories.