support return () syntax (#101)

* rebase upstream

* rebase

* trim no need line

* trim no need line

* trim no need line

* update doc

* remove update

* remove no need

* remove no need

* goctl add jwt support

* goctl add jwt support

* goctl add jwt support

* goctl support import

* goctl support import

* support return ()

* support return ()

* remove pwd for windows not support

* revert

* remove no need

Co-authored-by: kingxt <dream4kingxt@163.com>
This commit is contained in:
kingxt
2020-09-27 17:23:15 +08:00
committed by GitHub
parent 9277ad77f7
commit 8a470bb6ee
2 changed files with 5 additions and 11 deletions

View File

@@ -91,19 +91,13 @@ func Prepare(projectDir string, checkGrpcEnv bool) (*Project, error) {
return nil, err
}
} else {
pwd, err := execx.Run("pwd", projectDir)
pwd, err := filepath.Abs(projectDir)
if err != nil {
return nil, err
}
pwd = filepath.Clean(strings.TrimSpace(pwd))
if !strings.HasPrefix(pwd, src) {
absPath, err := filepath.Abs(projectDir)
if err != nil {
return nil, err
}
name = filepath.Clean(filepath.Base(absPath))
name = filepath.Clean(filepath.Base(pwd))
path = projectDir
pkg = name
isInGoEnv = false