Skip to content

rkusa/http-assert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

assert

Simplified error handling for http routes using assert with status code that works well (but not exclusively) with rkusa/web.

Build Status GoDoc

Example

Middleware usage

app := web.New()
app.Use(assert.Middleware())

Asserting

assert.OK(username != "", 400, "No username given")
assert.Error(err)
assert.Success(err, 400, "something failed")

License

MIT

About

Simplified error handling for http routes using assert with status code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published