11##Pure
22<img align =" right " src =" https://raw.githubusercontent.com/go-playground/pure/master/logo.png " >
3- ![ Project status] ( https://img.shields.io/badge/version-4.0.0 -green.svg )
3+ ![ Project status] ( https://img.shields.io/badge/version-4.0.1 -green.svg )
44[ ![ Build Status] ( https://semaphoreci.com/api/v1/joeybloggs/pure/branches/master/badge.svg )] ( https://semaphoreci.com/joeybloggs/pure )
55[ ![ Coverage Status] ( https://coveralls.io/repos/github/go-playground/pure/badge.svg?branch=master )] ( https://coveralls.io/github/go-playground/pure?branch=master )
66[ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/go-playground/pure )] ( https://goreportcard.com/report/github.com/go-playground/pure )
@@ -95,7 +95,7 @@ p.Use(LoggingAndRecovery, Gzip...)
9595...
9696p.Post (" /users/add" , ...)
9797
98- // creates a group for user + inherits all middleware registered using p.Use()
98+ // creates a group for / user/:userid + inherits all middleware registered previously by p
9999user := p.Group (" /user/:userid" )
100100user.Get (" " , ...)
101101user.Post (" " , ...)
@@ -104,12 +104,12 @@ user.Delete("/delete", ...)
104104contactInfo := user.Group (" /contact-info/:cid" )
105105contactinfo.Delete (" /delete" , ...)
106106
107- // creates a group for others + inherits all middleware registered using p.Use() + adds
107+ // creates a group for / others, inherits all middleware registered previously by p + adds
108108// OtherHandler to middleware
109- others := p.Group (" /others" , OtherHandler )
109+ others := p.GroupWithMore (" /others" , OtherHandler )
110110
111- // creates a group for admin WITH NO MIDDLEWARE... more can be added using admin.Use()
112- admin := p.Group (" /admin" , nil )
111+ // creates a group for / admin WITH NO MIDDLEWARE... more can be added using admin.Use()
112+ admin := p.GroupWithNone (" /admin" )
113113admin.Use (SomeAdminSecurityMiddleware)
114114...
115115```
0 commit comments