feat: Replace mongo package with monc & mon (#2002)
* Replace mongo package with monc & mon * Add terminal whitespace * format code
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user