Nothing special here. Come on post some good feature requests, I'm starting to get bored!

Former-commit-id: 6afc6ab3a3d2c35bc588dc91c132f1f7a6b24db3
This commit is contained in:
Gerasimos (Makis) Maropoulos 2017-02-28 15:41:39 +02:00
parent 963e4609cf
commit f26dd69f9c
4 changed files with 13 additions and 6 deletions

2
.gitignore vendored
View File

@ -4,3 +4,5 @@
2M_donation_timeline.cpd
performance_tips.txt
notes.txt
organisations_using_iris.txt
independent_developers_using_iris.txt

View File

@ -10,7 +10,8 @@ import (
func main() {
app := iris.New()
app.Adapt(httprouter.New()) // adapt a router first of all
app.Adapt(iris.DevLogger()) // adapt a simple internal logger to print any errors
app.Adapt(httprouter.New()) // adapt a router, you can use gorillamux too
authConfig := basicauth.Config{
Users: map[string]string{"myusername": "mypassword", "mySecondusername": "mySecondpassword"},

View File

@ -8,7 +8,8 @@ import (
func main() {
app := iris.New()
app.Adapt(httprouter.New()) // adapt a router first of all
app.Adapt(iris.DevLogger()) // adapt a simple internal logger to print any errors
app.Adapt(httprouter.New()) // adapt a router, you can use gorillamux too
app.Use(i18n.New(i18n.Config{
Default: "en-US",

View File

@ -8,13 +8,16 @@ import (
func main() {
app := iris.New()
app.Adapt(httprouter.New())
app.Adapt(iris.DevLogger()) // fast way to enable non-fatal messages to be printed to the user
// fast way to enable non-fatal messages to be printed to the user
// (yes in iris even recover's errors are not fatal because it's restarting,
// ProdMode messages are only for things that Iris cannot continue at all,
// these are logged by-default but you can change that behavior too by passing a different LoggerPolicy to the .Adapt)
app.Use(recover.New()) // it's io.Writer is the same as app.Config.LoggerOut
app.Adapt(iris.DevLogger())
// adapt a router, you can use gorillamux too
app.Adapt(httprouter.New())
// use this recover(y) middleware
app.Use(recover.New())
i := 0
// let's simmilate a panic every next request