示例#1
0
文件: main.go 项目: pennello/go_steg
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)
	}
}
示例#2
0
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
	}
}