--- published: true layout: post title: Golang to Jupyter tags: coding golang jupyter featured: coding golang python mast: juypter --- post := "2" import ( "net/http" "io/ioutil" "fmt" ) // append the post variable assigned earlier in the notebook // try changing post := "2" to post := "1" or overwriting it // remember to re-execute the code block after any changes. resp, err := http.Get("https://jsonplaceholder.typicode.com/posts/" + post) if err != nil { panic(err) } body, err := ioutil.ReadAll(resp.Body) if err != nil { panic(err) } fmt.Printf("Getting Post #%s\n", post) fmt.Printf("Raw JSON: %s\n", body)