package utils import "git.i2edu.net/i2/i2-bill-api/internal/types" func ReturnHTTPSuccess(val interface{}) *types.Response { rtndata := types.Response{ Code: 200, Data: val, } return &rtndata } func ReturnHTTPFail(err error) *types.Response { rtndata := types.Response{ Code: 500, Msg: err.Error(), } return &rtndata } func ReturnHTTPUnauthorized(err error) *types.Response { rtndata := types.Response{ Code: 401, Msg: err.Error(), } return &rtndata }