Documentation
¶
Index ¶
- func IsNoGoProxy(path string) (bool, error)
- func ScanGoModFile(fromDir string, fn func(dir string, mod modfile.File) error) error
- func ScanGoModFileParallel(fromDir string, conc int, fn func(dir string, mod modfile.File) error) error
- type GoProxy
- func (m *GoProxy) Latest(ctx context.Context) (*Info, error)
- func (m *GoProxy) VersionFiles(ctx context.Context, version string) ([]fs.DirEntry, error)
- func (m *GoProxy) VersionInfo(ctx context.Context, version string) (*Info, error)
- func (m *GoProxy) VersionList(ctx context.Context) ([]string, error)
- func (m *GoProxy) VersionMod(ctx context.Context, version string) ([]byte, error)
- func (m *GoProxy) VersionZip(ctx context.Context, version string) (*zip.Reader, error)
- type HTTPClient
- type Info
- type Module
- type Modules
- func (ms *Modules) Append(items ...Module)
- func (ms Modules) Latest(ctx context.Context) (*Info, error)
- func (ms Modules) VersionFiles(ctx context.Context, version string) ([]fs.DirEntry, error)
- func (ms Modules) VersionInfo(ctx context.Context, version string) (*Info, error)
- func (ms Modules) VersionList(ctx context.Context) ([]string, error)
- func (ms Modules) VersionMod(ctx context.Context, version string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScanGoModFile ¶ added in v0.0.3
ScanGoModFile 查找 go.mod 文件
Types ¶
type GoProxy ¶
type GoProxy struct { Client HTTPClient Proxy string Module string }
GoProxy 通过 goproxy 获取 模块的信息,如版本列表,指定版本号的元信息、代码
https://go.dev/ref/mod#module-proxy
func (*GoProxy) VersionFiles ¶
func (*GoProxy) VersionList ¶
VersionList 版本列表 call $base/$module/@v/list
type Module ¶
type Module interface { VersionList(ctx context.Context) ([]string, error) VersionInfo(ctx context.Context, version string) (*Info, error) VersionMod(ctx context.Context, version string) ([]byte, error) VersionFiles(ctx context.Context, version string) ([]fs.DirEntry, error) Latest(ctx context.Context) (*Info, error) }
Click to show internal directories.
Click to hide internal directories.