diff --git a/style.md b/style.md index 4f4b0f642..4368ca75c 100644 --- a/style.md +++ b/style.md @@ -13,9 +13,12 @@ The redundancy reduction from removing the namespacing prefix is not useful enou ## Optional settings should have pointer Go types So we have a consistent way to identify unset values ([source][optional-pointer]). +The exceptions are slices, maps, and booleans where the default should be false, in which case `omitempty` is sufficient and no pointer is needed ([source][no-pointer-for-slices] and [source][no-pointer-for-boolean]). [capabilities]: config-linux.md#capabilities [class-id]: runtime-config-linux.md#network [integer-over-hex]: https://github.com/opencontainers/specs/pull/267#discussion_r48360013 [keep-prefix]: https://github.com/opencontainers/specs/pull/159#issuecomment-138728337 +[no-pointer-for-boolean]: https://github.com/opencontainers/specs/pull/290#discussion_r50296396 +[no-pointer-for-slices]: https://github.com/opencontainers/specs/pull/316/files#r50782982 [optional-pointer]: https://github.com/opencontainers/specs/pull/233#discussion_r47829711