fork download
  1. package main
  2.  
  3. import (
  4. "io"
  5. "net/http"
  6. "os"
  7. )
  8.  
  9. func main() {
  10. rsp, err := http.Get("http://w...content-available-to-author-only...e.com")
  11. if err != nil {
  12. panic(err)
  13. }
  14. defer rsp.Body.Close()
  15.  
  16. _, err = io.Copy(os.Stdout, rsp.Body)
  17. if err != nil {
  18. panic(err)
  19. }
  20. }
Runtime error #stdin #stdout #stderr 0s 821248KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
panic: Get http://w...content-available-to-author-only...e.com: dial tcp: lookup www.example.com: no such host

goroutine 1 [running]:
main.main()
	/home/AaALA3/prog.go:12 +0x63

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
	/usr/local/go/src/runtime/asm_386.s:2287 +0x1