commit | b041814528e9498b10e2ed88246e991c197e412f | [log] [tgz] |
---|---|---|
author | Theodore Wilson <theodore.wilson@us.ibm.com> | Tue Jan 19 21:21:02 2016 -0800 |
committer | Theodore Wilson <theodore.wilson@us.ibm.com> | Tue Jan 19 21:21:02 2016 -0800 |
tree | 8ad4c258d517e4b44d624125475ebf099a55154b | |
parent | 8cef23882ae7a70f3eed9dc2bd2bd71c4e304e1c [diff] |
modified readme.md
import (
"net/http"
"net/url"
client "github.ibm.com/Bluemix/go-whisk"
)
func main() {
whisk, err := client.New(http.DefaultClient, nil)
if err != nil {
fmt.Println(err)
os.Exit(-1)
}
actions, resp, err := whisk.Actions.Get("actionName")
if err != nil {
fmt.Println(err)
os.Exit(-1)
}
fmt.Println("Returned with status: ", resp.Status)
fmt.Println("Returned actions: \n%+v", actions)
}
Whisk can be configured by passing in a *whisk.Config
object as the second argument to whisk.New( ... )
. Its declaration is:
package whisk type Config struct { Namespace string // NOTE :: Default is "_" AuthToken string BaseURL *url.URL // NOTE :: Default is "whisk.stage1.ng.bluemix.net" Version string Verbose bool }