Everything is an RPCResponse

This commit is contained in:
Jae Kwon
2015-04-01 04:58:33 -07:00
parent 7b049e93fb
commit cc715e0ee3
8 changed files with 121 additions and 152 deletions

View File

@ -23,8 +23,8 @@ var (
//RE_ID12 = regexp.MustCompile(`^[a-zA-Z0-9]{12}$`)
)
func panicAPI(err error) {
panic(APIResponse{API_INVALID_PARAM, nil, err.Error()})
func panicRPC(err error) {
panic(NewRPCResponse(nil, err.Error()))
}
func GetParam(r *http.Request, param string) string {