You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/09/28 18:59:56 UTC
[GitHub] csantanapr edited a comment on issue #52: import package can not be
compiled with the vendor folder
csantanapr edited a comment on issue #52: import package can not be compiled with the vendor folder
URL: https://github.com/apache/incubator-openwhisk-runtime-go/issues/52#issuecomment-425533869
I tried this, still not luck but I got a different error
```
🍰 $ GOPATH=/Users/csantana23/dev/whisk/demos/golang/zipexample go get github.com/Sirupsen/logrus
👽 $ ls
pkg src
🍰 $ ls pkg/
darwin_amd64
⛄ $ ls src/
github.com golang.org main
⛄ $ ls src/github.com/Sirupsen/
logrus
👽 $ cat src/main
import (
log "github.com/Sirupsen/logrus"
)
func Main(params map[string]interface{}) map[string]interface{} {
// do your work
name, ok := params["name"].(string)
if !ok {
name = "stranger"
}
msg := make(map[string]interface{})
msg["body"] = "Hello, " + name + "!"
// log in stdout or in stderr
log.Println("name=%s\n", name)
// encode the result back in json
return msg
}
```
running
```
adding: src/github.com/Sirupsen/logrus/alt_exit.go (deflated 47%)
adding: src/github.com/Sirupsen/logrus/terminal_check_js.go (deflated 7%)
adding: src/main (deflated 36%)
2018/09/28 18:57:33 stat ./action/1/src/main.go: no such file or directory
2018/09/28 18:57:34 ./launch_main.go_.go:48:16: syntax error: unexpected go, expecting name or (
./launch_main.go_.go:51:2: expression in go must be function call
./launch_main.go_.go:51:6: syntax error: unexpected := at end of statement
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services