Permalink
Browse files
Improve documentation for Classic()
- Loading branch information...
Showing
with
2 additions
and
1 deletion.
-
+2
−1
middlewares.go
|
@@ -24,7 +24,8 @@ var cyan = color.New(color.FgCyan).SprintFunc() |
|
|
var hiBlue = color.New(color.FgHiBlue).SprintFunc()
|
|
|
var lionColor = color.New(color.Italic, color.FgHiGreen).SprintFunc()
|
|
|
|
|
|
-// Classic creates a new router with some handy middlewares.
|
|
|
+// Classic creates a new router instance with default middlewares: Recovery, RealIP, Logger and Static.
|
|
|
+// The static middleware instance is initiated with a directory named "public" located relatively to the current working directory.
|
|
|
func Classic() *Router {
|
|
|
return New(NewRecovery(), RealIP(), NewLogger(), NewStatic(http.Dir("public")))
|
|
|
}
|
|
|
0 comments on commit
41484d0