Skip to content

Instantly share code, notes, and snippets.

@stnc
Last active November 29, 2017 12:45
Show Gist options
  • Save stnc/a9a235edeb45b3c3a5c2288534abf28f to your computer and use it in GitHub Desktop.
Save stnc/a9a235edeb45b3c3a5c2288534abf28f to your computer and use it in GitHub Desktop.
goLang simple crawler
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
crawl();
}
//https://www.reddit.com/r/golang/comments/2twz45/download_webpage_and_extract_words/
func crawl() {
var url = "http://www.h4labs.com"
resp, err := http.Get(url)
if err != nil {
// handle error
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
fmt.Print(string(body))
}
https://www.youtube.com/watch?v=8746NP2aIuo
https://stackoverflow.com/questions/20781111/postgresql-9-1-primary-key-autoincrement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment