Created
October 9, 2017 19:31
-
-
Save vbatts/5531b8c38039ecc2eef30ce5a17f25ad to your computer and use it in GitHub Desktop.
grafeas client trial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"github.com/davecgh/go-spew/spew" | |
grf "github.com/grafeas/client-go" | |
) | |
func main() { | |
api := grf.NewGrafeasApiWithBasePath("http://0.0.0.0:8080") | |
spew.Dump(api) | |
note := grf.Note{ | |
Name: "note01", | |
ShortDescription: "this is just a test", | |
} | |
spew.Dump(note) | |
retNote, resp, err := api.CreateNote("project01", note.Name, note) //projectsId string, noteId string, note Note) (*Note, *APIResponse, error) | |
if err != nil { | |
spew.Dump(resp) | |
log.Fatal(err) | |
} | |
// for verbose review | |
spew.Dump(resp) | |
spew.Dump(retNote) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment