feat: Replace mongo package with monc & mon (#2002)

* Replace mongo package with monc & mon

* Add terminal whitespace

* format code
This commit is contained in:
anqiansong
2022-06-12 23:02:34 +08:00
committed by GitHub
parent ed1c937998
commit c27e00b45c
16 changed files with 544 additions and 255 deletions

View File

@@ -38,12 +38,14 @@ func Action(_ *cobra.Command, _ []string) error {
home := VarStringHome
remote := VarStringRemote
branch := VarStringBranch
if len(remote) > 0 {
repo, _ := file.CloneIntoGitHome(remote, branch)
if len(repo) > 0 {
home = repo
}
}
if len(home) > 0 {
pathx.RegisterGoctlHome(home)
}
@@ -62,6 +64,10 @@ func Action(_ *cobra.Command, _ []string) error {
return err
}
if err = pathx.MkdirIfNotExist(a); err != nil {
return err
}
return generate.Do(&generate.Context{
Types: tp,
Cache: c,