Skip to content

Docs for #1736 fluent binder - #172

Merged
pafuent merged 4 commits into
labstack:masterfrom
aldas:docs_1736_fluent_binder
Feb 2, 2021
Merged

pafuent merged 4 commits into
labstack:masterfrom
aldas:docs_1736_fluent_binder

Conversation

@aldas

@aldas aldas commented Jan 2, 2021

Copy link
Copy Markdown
Contributor

@pafuent pafuent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR includes the docs of #169, so maybe this could be merged instead of it if the Fluent Binder PR gets merged soon

Comment thread website/content/guide/request.md Outdated
```

### Methods
`FailFast` flags binder to stop binding after first bind error during binder call chain. Enabled by default.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think FailFast should include the () to be consistent

Comment thread website/content/guide/request.md Outdated

* `<Type>("param", &destination)` - if parameter value exists then binds it to given destination of that type i.e `Int64(...)`.
* `Must<Type>("param", &destination)` - parameter value is required to exist, binds it to given destination of that type i.e `MustInt64(...)`.
* `<Type>s("param", &destination)` - (for slices) if parameter values exists then binds it to given destination of that type i.e `I`nt64s(...)`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here there is a extra ` after the I (`I`nt64s(...)`)

Comment thread website/content/guide/request.md Outdated
* `<Type>s("param", &destination)` - (for slices) if parameter values exists then binds it to given destination of that type i.e `I`nt64s(...)`.
* `Must<Type>s("param", &destination)` - (for slices) parameter value is required to exist, binds it to given destination of that type i.e `MustInt64s(...)`.

for some slice types `BindWithDelimiter("param", &dest, ",")` supports slitting parameter values before type conversion is done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo on slitting

@lammel

lammel commented Jan 31, 2021

Copy link
Copy Markdown
Contributor

@aldas @pafuent Maybe you can take a look on the doc updates.
Binding has been moved to it's own guide now and feedback from @pafuent is included.

Mention `UnixTimeNano()` as supported fluent binder function
@aldas

aldas commented Feb 1, 2021

Copy link
Copy Markdown
Contributor Author

lgtm. I added 2 little changes:

  • example was anonymous function (without name) so I added e.POST("/users", in front of example to be more familiar route definition.
  • mentioned UnixTimeNano() as supported fluent binder function

splitting binder to its own page is good move. It is easier to find it on site.

@pafuent
pafuent merged commit d899094 into labstack:master Feb 2, 2021
@aldas
aldas deleted the docs_1736_fluent_binder branch February 23, 2021 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants