feat: Add --remote (#1387)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
This commit is contained in:
@@ -17,6 +17,7 @@ import (
|
||||
const (
|
||||
NL = "\n"
|
||||
goctlDir = ".goctl"
|
||||
gitDir = ".git"
|
||||
)
|
||||
|
||||
var goctlHome string
|
||||
@@ -82,6 +83,16 @@ func GetGoctlHome() (string, error) {
|
||||
return filepath.Join(home, goctlDir), nil
|
||||
}
|
||||
|
||||
// GetGitHome returns the git home of goctl.
|
||||
func GetGitHome() (string, error) {
|
||||
goctlH, err := GetGoctlHome()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return filepath.Join(goctlH, gitDir), nil
|
||||
}
|
||||
|
||||
// GetTemplateDir returns the category path value in GoctlHome where could get it by GetGoctlHome
|
||||
func GetTemplateDir(category string) (string, error) {
|
||||
goctlHome, err := GetGoctlHome()
|
||||
|
||||
Reference in New Issue
Block a user