summaryrefslogtreecommitdiff
path: root/protoc.go
diff options
context:
space:
mode:
Diffstat (limited to 'protoc.go')
-rw-r--r--protoc.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/protoc.go b/protoc.go
index af7e0d1..53955e3 100644
--- a/protoc.go
+++ b/protoc.go
@@ -36,13 +36,13 @@ func protocBuild(names map[string]string) error {
// return nil
}
log.Info("make protoc file:", names["protoc"])
- log.Info("go src", forge.GetGoSrc())
+ // log.Info("go src", forge.GetGoSrc())
pwd, _ := os.Getwd()
log.Info("go.Getwd()", pwd)
- if !strings.HasPrefix(pwd, forge.GetGoSrc()) {
+ if !strings.HasPrefix(pwd, argv.GoSrc) {
return errors.New("paths don't match")
}
- gopath := strings.TrimPrefix(pwd, forge.GetGoSrc())
+ gopath := strings.TrimPrefix(pwd, argv.GoSrc)
gopath = strings.Trim(gopath, "/")
log.Info("gopath", gopath)
cmd := []string{"protoc", "--go_out=."}
@@ -84,10 +84,10 @@ func protocBuild(names map[string]string) error {
}
cmd = append(cmd, names["protofile"])
- log.Info("\tpwd", forge.GetGoSrc())
+ log.Info("\tpwd", argv.GoSrc)
for i, s := range cmd {
log.Info("\t", i, s)
}
- shell.PathRun(forge.GetGoSrc(), cmd)
+ shell.PathRun(argv.GoSrc, cmd)
return nil
}