#8 delete cobra, add parsing .netrc
This commit is contained in:
@@ -9,11 +9,11 @@ type Config struct {
|
||||
}
|
||||
|
||||
type Source struct {
|
||||
TypeGit string `json:"type" yaml:"type"`
|
||||
Token string `json:"token" yaml:"token"`
|
||||
APIURL string `json:"apiurl" yaml:"apiurl"`
|
||||
Repository string `json:"repository" yaml:"repository"`
|
||||
Owner string `json:"owner" yaml:"owner"`
|
||||
TypeGit string `json:"type" yaml:"type" env:"GIT_TYPE"`
|
||||
Token string `json:"token" yaml:"token" env:"GIT_TOKEN"`
|
||||
APIURL string `json:"apiurl" yaml:"apiurl" env:"GIT_API"`
|
||||
Repository string `json:"repository" yaml:"repository" env:"GIT_REPO"`
|
||||
Owner string `json:"owner" yaml:"owner" env:"GIT_OWNER"`
|
||||
}
|
||||
|
||||
type UpdateOpt struct {
|
||||
@@ -23,8 +23,14 @@ type UpdateOpt struct {
|
||||
Cached bool `json:"cached" yaml:"cached" default:"true"`
|
||||
}
|
||||
|
||||
type Cli struct {
|
||||
Method string `flag:"name=method,desc='choice method(update, close, checkupdaue, list)',default='checkupdate'"`
|
||||
Path string `flag:"name=path,desc='title of mod',default=''"`
|
||||
}
|
||||
|
||||
func NewConfig() *Config {
|
||||
return &Config{
|
||||
Source: &Source{},
|
||||
Source: &Source{},
|
||||
UpdateOpt: &UpdateOpt{},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user