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 2021/06/18 21:20:21 UTC
[GitHub] [openwhisk-client-go] john98nf commented on issue #151: Create/Deploy a go action using this go-client
john98nf commented on issue #151:
URL: https://github.com/apache/openwhisk-client-go/issues/151#issuecomment-864219566
Solution found by studying openwhisk-cli [action create command](https://github.com/apache/openwhisk-cli/blob/7c47ef1dbad550566114baf976c091b4cdd9e678/commands/action.go#L85) implementation itself. Code field requires to point to a string containing the action-code. So something like:
```
file, err := ioutil.ReadFile("/path/to/sourceCode.go")
if err != nil {
log.Fatal(err)
}
code := string(file)
newAction.Exec.Code = &code
```
, should do the trick.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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