Skip to content

Commit

Permalink
Allow framework users to mock martini.Context.
Browse files Browse the repository at this point in the history
  • Loading branch information
shuhei committed Dec 28, 2013
1 parent 957bc53 commit 5a3bda4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions martini.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ type Context interface {
// the other Handlers have been executed. This works really well for any operations that must
// happen after an http request
Next()
written() bool
Written() bool
}

type context struct {
Expand All @@ -137,7 +137,7 @@ func (c *context) Next() {
c.run()
}

func (c *context) written() bool {
func (c *context) Written() bool {
return c.rw.Written()
}

Expand Down
2 changes: 1 addition & 1 deletion router.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (r *routeContext) run() {
handleReturn(rv.Interface().(http.ResponseWriter), vals)
}

if r.written() {
if r.Written() {
return
}
}
Expand Down

0 comments on commit 5a3bda4

Please sign in to comment.