docs: Slightly clarify parameter defaults

This commit is contained in:
Felix Frank
2019-03-01 00:15:19 +01:00
committed by James Shubin
parent e587324b81
commit dc03e67b81

View File

@@ -96,8 +96,10 @@ Default() engine.Res
``` ```
This returns a populated resource struct as a `Res`. It shouldn't populate any This returns a populated resource struct as a `Res`. It shouldn't populate any
values which already have the correct default as the golang zero value. In values which already get a good default as the respective golang zero value. In
general it is preferable if the zero values make for the correct defaults. general it is preferable if the zero values make for the correct defaults.
(This is to say, resources are designed to behave safely and intuitively
when parameters take a zero value, whenever this is possible.)
#### Example #### Example