Last active
December 14, 2016 13:47
-
-
Save Ch00k/53715039b0e169adf907aa9d9d511ef2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 ( | |
"fmt" | |
"golang.org/x/net/html" | |
"net/http" | |
) | |
func main() { | |
resp, err := http.Get("http://example.com") | |
if err != nil { | |
panic(err) | |
} | |
doc, err := html.Parse(resp.Body) | |
if err != nil { | |
panic(err) | |
} | |
fmt.Print(doc) | |
fmt.Print(doc.Data) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment