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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user