Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoSrc ¶
GoSrc 负责管理 包引入地址 和 实际文件地址 之间的关系
func NewGoSrcFromModFile ¶
func (*GoSrc) FormatPath ¶
FormatPath 会格式化用户在yaml中写的路径为规范路径, 即将相对路径转换为包含module名字的完整路径
func (*GoSrc) GetAbsPath ¶
获取文件的绝对路径 e.g.
path: github.com/gopenapi/gopenapi/internal/model, returned: Z:\golang\go_project\gopenapi\internal\model path: github.com/gopenapi/gopenapi/internal/delivery/http/handler/pet.go, returned: Z:\golang\go_project\gopenapi\internal\delivery\http\handler\pet.go path: ./internal/delivery/http/handler/pet.go, returned: Z:\golang\go_project\gopenapi\internal\delivery\http\handler\pet.go
return:
isInProject: 是否是本项目的地址
func (*GoSrc) GetPkgPath ¶
GetPkgPath 返回相对路径
Click to show internal directories.
Click to hide internal directories.