#8 delete cobra, add micro-config-flag (#11)

Убрана кобра, доработаны методы создания, закрытия пулл реквестов.

Co-authored-by: Gorbunov Kirill Andreevich <kgorbunov@mtsbank.ru>
Reviewed-on: #11
Co-authored-by: Кирилл Горбунов <kirya_gorbunov_2015@mail.ru>
Co-committed-by: Кирилл Горбунов <kirya_gorbunov_2015@mail.ru>
This commit is contained in:
Кирилл Горбунов
2024-04-02 22:54:15 +03:00
parent f913c01fca
commit eb2a21a1b1
24 changed files with 1337 additions and 1749 deletions

View File

@@ -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 {
Command string `flag:"name=command,desc='choice command(update, close, checkupdaue, list)',default=''"`
Path string `flag:"name=path,desc='title of mod',default=''"`
}
func NewConfig() *Config {
return &Config{
Source: &Source{},
Source: &Source{},
UpdateOpt: &UpdateOpt{},
}
}