package main

import (
	"fmt"
	"io"
	. "net/http"
	"os"
)

func main() {
	for _, url := range os.Args[1:] {
		resp, err := Get(url)
		if err != nil {
			fmt.Fprintf(os.Stderr,
				"Fetch: %v", err)
			os.Exit(1)
		}

		_, err = io.Copy(os.Stdout, resp.Body)
		if err != nil {
			fmt.Fprintf(os.Stderr,
				"Fetch: %s as %v", url, err)
			os.Exit(1)
		}
		resp.Body.Close()
	}
}
