Documentation ¶
Index ¶
- Variables
- func RegisterProxyMethod(pctx inject.ProxyContext, cf inject.CtxFunc)
- type IImportPath
- type IImportPathMock
- type ImportPath
- func (p *ImportPath) FindAllModule(dir string) (mods []Module, err error)
- func (p *ImportPath) GetByCurrentDir() (path string, err error)
- func (p *ImportPath) GetCurrentDirModFilePath() (modDir, modPath string, err error)
- func (p *ImportPath) GetModFilePath(dir string) (modDir, modPath string, err error)
- func (p *ImportPath) SplitImportPathWithType(importPathWithType string) (string, string)
- type ImportPathMock
- func (mockRecv *ImportPathMock) GetByCurrentDir() (path string, err error)
- func (mockRecv *ImportPathMock) GetCurrentDirModFilePath() (modDir string, modPath string, err error)
- func (mockRecv *ImportPathMock) GetModFilePath(dir string) (modDir string, modPath string, err error)
- func (mockRecv *ImportPathMock) SplitImportPathWithType(importPathWithType string) (string, string)
- type ImportPathMockMock
- type Module
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ImportPathMockGetByCurrentDirProxyContext = func() (pctx inject.ProxyContext) { pctx = importPathMockCommonProxyContext pctx.MethodName = "GetByCurrentDir" return }() ImportPathMockGetCurrentDirModFilePathProxyContext = func() (pctx inject.ProxyContext) { pctx = importPathMockCommonProxyContext pctx.MethodName = "GetCurrentDirModFilePath" return }() ImportPathMockGetModFilePathProxyContext = func() (pctx inject.ProxyContext) { pctx = importPathMockCommonProxyContext pctx.MethodName = "GetModFilePath" return }() ImportPathMockSplitImportPathWithTypeProxyContext = func() (pctx inject.ProxyContext) { pctx = importPathMockCommonProxyContext pctx.MethodName = "SplitImportPathWithType" return }() )
View Source
var ( ImportPathMockMockGetByCurrentDirProxyContext = func() (pctx inject.ProxyContext) { pctx = importPathMockMockCommonProxyContext pctx.MethodName = "GetByCurrentDir" return }() ImportPathMockMockGetCurrentDirModFilePathProxyContext = func() (pctx inject.ProxyContext) { pctx = importPathMockMockCommonProxyContext pctx.MethodName = "GetCurrentDirModFilePath" return }() ImportPathMockMockGetModFilePathProxyContext = func() (pctx inject.ProxyContext) { pctx = importPathMockMockCommonProxyContext pctx.MethodName = "GetModFilePath" return }() )
Functions ¶
func RegisterProxyMethod ¶ added in v0.12.0
func RegisterProxyMethod(pctx inject.ProxyContext, cf inject.CtxFunc)
Types ¶
type IImportPath ¶
type IImportPathMock ¶ added in v0.5.0
type ImportPath ¶
type ImportPath struct { }
func (*ImportPath) FindAllModule ¶ added in v0.15.2
func (p *ImportPath) FindAllModule(dir string) (mods []Module, err error)
FindAllModule 寻找目录下的所有module
func (*ImportPath) GetByCurrentDir ¶
func (p *ImportPath) GetByCurrentDir() (path string, err error)
GetCurrentDirPath 获取当前目录的包导入路径
func (*ImportPath) GetCurrentDirModFilePath ¶
func (p *ImportPath) GetCurrentDirModFilePath() (modDir, modPath string, err error)
func (*ImportPath) GetModFilePath ¶
func (p *ImportPath) GetModFilePath(dir string) (modDir, modPath string, err error)
func (*ImportPath) SplitImportPathWithType ¶ added in v0.5.0
func (p *ImportPath) SplitImportPathWithType(importPathWithType string) (string, string)
type ImportPathMock ¶ added in v0.5.0
type ImportPathMock struct { GetByCurrentDirFunc func() (path string, err error) GetCurrentDirModFilePathFunc func() (modDir string, modPath string, err error) GetModFilePathFunc func(dir string) (modDir string, modPath string, err error) SplitImportPathWithTypeFunc func(importPathWithType string) (string, string) }
func (*ImportPathMock) GetByCurrentDir ¶ added in v0.5.0
func (mockRecv *ImportPathMock) GetByCurrentDir() (path string, err error)
func (*ImportPathMock) GetCurrentDirModFilePath ¶ added in v0.5.0
func (mockRecv *ImportPathMock) GetCurrentDirModFilePath() (modDir string, modPath string, err error)
func (*ImportPathMock) GetModFilePath ¶ added in v0.5.0
func (mockRecv *ImportPathMock) GetModFilePath(dir string) (modDir string, modPath string, err error)
func (*ImportPathMock) SplitImportPathWithType ¶ added in v0.5.0
func (mockRecv *ImportPathMock) SplitImportPathWithType(importPathWithType string) (string, string)
type ImportPathMockMock ¶ added in v0.5.0
type ImportPathMockMock struct { GetByCurrentDirFunc func() (path string, err error) GetCurrentDirModFilePathFunc func() (modDir string, modPath string, err error) GetModFilePathFunc func(dir string) (modDir string, modPath string, err error) }
func (*ImportPathMockMock) GetByCurrentDir ¶ added in v0.5.0
func (mockRecv *ImportPathMockMock) GetByCurrentDir() (path string, err error)
func (*ImportPathMockMock) GetCurrentDirModFilePath ¶ added in v0.5.0
func (mockRecv *ImportPathMockMock) GetCurrentDirModFilePath() (modDir string, modPath string, err error)
func (*ImportPathMockMock) GetModFilePath ¶ added in v0.5.0
func (mockRecv *ImportPathMockMock) GetModFilePath(dir string) (modDir string, modPath string, err error)
Click to show internal directories.
Click to hide internal directories.