blob: a0d1b7370856fd381572962a38eb0be0a0ba86f5 [file] [log] [blame]
// +build OMIT
package main
import (
"log"
"net/http"
)
func main() {
b := []byte(jsonBlob)
err := http.ListenAndServe(":80", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write(b)
}))
log.Fatal(err)
}
const jsonBlob = `{"data":{"after":"t3_ubvcv","before":null,"children":[{"data":{"approved_by":null,"author":"bockris","author_flair_css_class":null,"author_flair_text":null,"banned_by":null,"clicked":false,"created":1.340311589e+09,"created_utc":1.340286389e+09,"domain":"research.swtch.com","downs":0,"edited":false,"hidden":false,"id":"vdq4f","is_self":false,"likes":null,"link_flair_css_class":null,"link_flair_text":null,"media":null,"media_embed":{},"name":"t3_vdq4f","num_comments":0,"num_reports":null,"over_18":false,"permalink":"/r/golang/comments/vdq4f/researchrsc_a_tour_of_go/","saved":false,"score":9,"selftext":"","selftext_html":null,"subreddit":"golang","subreddit_id":"t5_2rc7j","thumbnail":"","title":"research!rsc: A Tour of Go","ups":9,"url":"http://research.swtch.com/gotour"},"kind":"t3"},{"data":{"approved_by":null,"author":"HornedKavu","author_flair_css_class":null,"author_flair_text":null,"banned_by":null,"clicked":false,"created":1.340120634e+09,"created_utc":1.340095434e+09,"domain":"blog.davidsingleton.org","downs":4,"edited":false,"hidden":false,"id":"v9onh","is_self":false,"likes":null,"link_flair_css_class":null,"link_flair_text":null,"media":null,"media_embed":{},"name":"t3_v9onh","num_comments":1,"num_reports":null,"over_18":false,"permalink":"/r/golang/comments/v9onh/parsing_huge_xml_files_with_go/","saved":false,"score":34,"selftext":"","selftext_html":null,"subreddit":"golang","subreddit_id":"t5_2rc7j","thumbnail":"","title":"Parsing huge XML files with Go","ups":38,"url":"http://blog.davidsingleton.org/parsing-huge-xml-files-with-go/"},"kind":"t3"},{"data":{"approved_by":null,"author":"DavidScone","author_flair_css_class":null,"author_flair_text":null,"banned_by":null,"clicked":false,"created":1.340115741e+09,"created_utc":1.340115741e+09,"domain":"lawlessguy.wordpress.com","downs":1,"edited":false,"hidden":false,"id":"v9z0i","is_self":false,"likes":null,"link_flair_css_class":null,"link_flair_text":null,"media":null,"media_embed":{},"name":"t3_v9z0i","num_comments":10,"num_reports":null,"over_18":false,"permalink":"/r/golang/comments/v9z0i/prelude_to_an_embeddable_programming_language_in/","saved":false,"score":5,"selftext":"","selftext_html":null,"subreddit":"golang","subreddit_id":"t5_2rc7j","thumbnail":"","title":"Prelude to an Embeddable Programming Language in Go (Golang)","ups":6,"url":"http://lawlessguy.wordpress.com/2012/06/19/prelude-to-an-embeddable-programming-language-in-go-golang/"},"kind":"t3"},{"data":{"approved_by":null,"author":"dgryski","author_flair_css_class":null,"author_flair_text":null,"banned_by":null,"clicked":false,"created":1.339783575e+09,"created_utc":1.339783575e+09,"domain":"arxiv.org","downs":0,"edited":false,"hidden":false,"id":"v3rlk","is_self":false,"likes":null,"link_flair_css_class":null,"link_flair_text":null,"media":null,"media_embed":{},"name":"t3_v3rlk","num_comments":2,"num_reports":null,"over_18":false,"permalink":"/r/golang/comments/v3rlk/time_warp_on_the_go_pdf/","saved":false,"score":12,"selftext":"","selftext_html":null,"subreddit":"golang","subreddit_id":"t5_2rc7j","thumbnail":"","title":"Time Warp on the Go [PDF]","ups":12,"url":"http://arxiv.org/abs/1206.2772"},"kind":"t3"},{"data":{"approved_by":null,"author":"enneff","author_flair_css_class":null,"author_flair_text":null,"banned_by":null,"clicked":false,"created":1.339650531e+09,"created_utc":1.339650531e+09,"domain":"groups.google.com","downs":3,"edited":false,"hidden":false,"id":"v16zb","is_self":false,"likes":null,"link_flair_css_class":null,"link_flair_text":null,"media":null,"media_embed":{},"name":"t3_v16zb","num_comments":6,"num_reports":null,"over_18":false,"permalink":"/r/golang/comments/v16zb/go_102_is_out/","saved":false,"score":55,"selftext":"","selftext_html":null,"subreddit":"golang","subreddit_id":"t5_2rc7j","thumbnail":"","title":"Go 1.0.2 is out!","ups":58,"url":"https://groups.google.com/d/msg/golang-nuts/YOYs04O9Tes/MjBJoksRBmQJ"},"kind":"t3"},{"data":{"approved_by":null,"author":"crosone","author_flair_css_class":null,"author_flair_text":null,"banned_by":null,"clicked":false,"created":1.339700883e+09,"created_utc":1.339700883e+09,"domain":"self.golang","downs":0,"edited":false,"hidden":false,"id":"v23qr","is_self":true,"likes":null,"link_flair_css_class":null,"link_flair_text":null,"media":null,"media_embed":{},"name":"t3_v23qr","num_comments":3,"num_reports":null,"over_18":false,"permalink":"/r/golang/comments/v23qr/confusion_over_type_assertions_against_interfaces/","saved":false,"score":8,"selftext":"My question revolves around [this code](http://play.golang.org/p/DkbkZgHbUz).\n\nThe upshot is that, from what I interpret from the spec, performing a type assertion on either another interface or a static type is valid. However, compiling fails when I attempt to do an assertion on a static type of a variable.\n\nI'm pretty certain that I've misunderstood what I've read in the spec. However, if anyone could shed some light on why this cannot be done I'd be very grateful.\n\n","selftext_html":"<!-- SC_OFF --><div class=\"md\"><p>My question revolves around <a href=\"http://play.golang.org/p/DkbkZgHbUz\">this code</a>.</p>\n\n<p>The upshot is that, from what I interpret from the spec, performing a type assertion on either another interface or a static type is valid. However, compiling fails when I attempt to do an assertion on a static type of a variable.</p>\n\n<p>I'm pretty certain that I've misunderstood what I've read in the spec. However, if anyone could shed some light on why this cannot be done I'd be very grateful.</p>\n</div><!-- SC_ON -->","subreddit":"golang","subreddit_id":"t5_2rc7j","thumbnail":"","title":"Confusion over type assertions against interfaces.","ups":8,"url":"http://www.reddit.com/r/golang/comments/v23qr/confusion_over_type_assertions_against_interfaces/"},"kind":"t3"}],"modhash":""},"kind":"Listing"}`