Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
RangelReale committed Jul 4, 2023
1 parent dc053b5 commit e43803c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ func ExampleDecode() {
data := &Input{}

err = inreq.Decode(r, data,
inreq.WithPathValue(inreq.PathValueFunc(func(r *http.Request, name string) (found bool, value any, err error) {
// usually this will be a framework-specific implementation, like "github.com/RangelReale/inreq-path/gorillamux".
inreq.WithPathValue(inreq.PathValueFunc(func(r *http.Request, name string) (found bool, value any, err error) {
if name == "deviceid" {
return true, "12345", err
}
Expand Down
1 change: 1 addition & 0 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func ExampleDecode() {
data := &Input{}

err = inreq.Decode(r, data,
// usually this will be a framework-specific implementation, like "github.com/RangelReale/inreq-path/gorillamux".
inreq.WithPathValue(inreq.PathValueFunc(func(r *http.Request, name string) (found bool, value any, err error) {
if name == "deviceid" {
return true, "12345", err
Expand Down

0 comments on commit e43803c

Please sign in to comment.