Skip to content

Commit 6279a54

Browse files
author
joeybloggs
committed
Update documentation for new Group functionality
- Updated README examples to reflect the new Group functionality.
1 parent 5489e33 commit 6279a54

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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
...
9696
p.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
9999
user := p.Group("/user/:userid")
100100
user.Get("", ...)
101101
user.Post("", ...)
@@ -104,12 +104,12 @@ user.Delete("/delete", ...)
104104
contactInfo := user.Group("/contact-info/:cid")
105105
contactinfo.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")
113113
admin.Use(SomeAdminSecurityMiddleware)
114114
...
115115
```

0 commit comments

Comments
 (0)