cleanup
This commit is contained in:
+2
-2
@@ -46,9 +46,9 @@ type Stack struct {
|
||||
|
||||
var _ basecoin.Handler = &Stack{}
|
||||
|
||||
// NewStack prepares a middleware stack, you must `.Use()` a Handler
|
||||
// New prepares a middleware stack, you must `.Use()` a Handler
|
||||
// before you can execute it.
|
||||
func NewStack(middlewares ...Middleware) *Stack {
|
||||
func New(middlewares ...Middleware) *Stack {
|
||||
return &Stack{
|
||||
middles: middlewares,
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ func TestRecovery(t *testing.T) {
|
||||
i := strconv.Itoa(idx)
|
||||
fail := PanicHandler{Msg: tc.msg, Err: tc.err}
|
||||
rec := Recovery{}
|
||||
app := NewStack(rec).Use(fail)
|
||||
app := New(rec).Use(fail)
|
||||
|
||||
// make sure check returns error, not a panic crash
|
||||
_, err := app.CheckTx(ctx, store, tx)
|
||||
|
||||
Reference in New Issue
Block a user