func main() { log.SetFlags(0) log.SetPrefix(fmt.Sprintf("%s: ", os.Args[0])) err := cmd.Main(os.Stdout, state) if err != nil { log.Print(err) os.Exit(1) } }
func mimeHandler(w http.ResponseWriter, req *http.Request) { s, err := parseForm(req) if err != nil { errorResponse(w, 400, err) return } err = cmd.Main(w, s) if err != nil { errorResponse(w, 500, err) return } }