Advertisement
pcwizz

Untitled

Sep 15th, 2014
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.26 KB | None | 0 0
  1. resp, err := http.Get(uri)
  2.     if err != nil{
  3.         log.Fatal(err)
  4.     }
  5.     defer resp.Body.Close()
  6.     body, err := ioutil.ReadAll(resp.Body)
  7.     if err != nil{
  8.         log.Fatal(err)
  9.     }
  10.     doc, err := html.Parse(strings.NewReader(string(body)))
  11.     if err != nil{
  12.         log.Fatal(err)
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement