Documentation
¶
Index ¶
- Variables
- func ReadConf(path string) (url string, err error)
- type GrmConfig
- func (g *GrmConfig) Files() map[string]string
- func (g *GrmConfig) GetCurrentConf() string
- func (g *GrmConfig) GetCurrentPath() string
- func (g *GrmConfig) ListAllPath()
- func (g *GrmConfig) MergePaths(userConf map[string]string) map[string]string
- func (g *GrmConfig) ScannerUserConf() (source, key map[string]string)
- func (g *GrmConfig) SetCurrentPath(target string) bool
- type GrmIni
- type S
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultKey = map[S]string{ Npm: "https://registry.npmjs.org/", Yarn: "https://registry.yarnpkg.com/", Tencent: "https://mirrors.cloud.tencent.com/npm/", NpmMirror: "https://registry.npmmirror.com/", }
View Source
var DefaultSource = map[string]S{ "https://registry.npmjs.org/": Npm, "https://registry.yarnpkg.com/": Yarn, "https://mirrors.cloud.tencent.com/npm/": Tencent, "https://registry.npmmirror.com/": NpmMirror, }
View Source
var SourceToString = []string{
"npm",
"yarn",
"tencet",
"npmMirror",
"system",
}
Functions ¶
Types ¶
type GrmConfig ¶
type GrmConfig struct {
BaseDir string
ConfPath string
Paths []string
// contains filtered or unexported fields
}
func NewGrmConf ¶
func NewGrmConf() *GrmConfig
func (*GrmConfig) GetCurrentConf ¶
func (*GrmConfig) GetCurrentPath ¶
func (*GrmConfig) ListAllPath ¶
func (g *GrmConfig) ListAllPath()
func (*GrmConfig) MergePaths ¶
func (*GrmConfig) ScannerUserConf ¶
func (*GrmConfig) SetCurrentPath ¶
type GrmIni ¶
type GrmIni struct {
Path string
// contains filtered or unexported fields
}
func NewGrmIniParse ¶
Click to show internal directories.
Click to hide internal directories.