Skip to content

Commit f298e10

Browse files
committed
style: Reverse pro-pointer preference to be anti-pointer
The maintainer position on this has shifted, with the sea change coming around [1]. [1]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2017/opencontainers.2017-01-11-22.04.log.html#l-108 Signed-off-by: W. Trevor King <[email protected]>
1 parent 9a6aca2 commit f298e10

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

style.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ The config JSON isn't enough of a UI to be worth jumping through string <-> inte
1616
For example, `CAP_KILL` instead of `KILL` in [**`linux.capabilities`**][capabilities].
1717
The redundancy reduction from removing the namespacing prefix is not useful enough to be worth trimming the upstream identifier ([source][keep-prefix]).
1818

19-
## Optional settings should have pointer Go types
19+
## Optional settings should not have pointer Go types
2020

21-
So we have a consistent way to identify unset values ([source][optional-pointer]).
22-
The exceptions are entries where the Go default for the type is a no-op in the spec, in which case `omitempty` is sufficient and no pointer is needed (sources [here][no-pointer-for-slices], [here][no-pointer-for-boolean], and [here][pointer-when-updates-require-changes]).
21+
Because in many cases the Go default for the type is a no-op in the spec (sources [here][no-pointer-for-strings], [here][no-pointer-for-slices], and [here][no-pointer-for-boolean]).
22+
The exceptions are entries where we need to distinguish between “not set” and “set to the Go default for that type” ([source][pointer-when-updates-require-changes]), and this decision should be made on a per-setting case.
2323

2424
## Examples
2525

@@ -92,6 +92,6 @@ Following is a fully populated example (not necessarily for copy/paste use)
9292
[keep-prefix]: https://github.com/opencontainers/runtime-spec/pull/159#issuecomment-138728337
9393
[no-pointer-for-boolean]: https://github.com/opencontainers/runtime-spec/pull/290#r50296396
9494
[no-pointer-for-slices]: https://github.com/opencontainers/runtime-spec/pull/316#r50782982
95-
[optional-pointer]: https://github.com/opencontainers/runtime-spec/pull/233#r47829711
95+
[no-pointer-for-strings]: https://github.com/opencontainers/runtime-spec/pull/653#issue-200439192
9696
[pointer-when-updates-require-changes]: https://github.com/opencontainers/runtime-spec/pull/317#r50932706
9797
[markdown-headers]: https://help.github.com/articles/basic-writing-and-formatting-syntax/#headings

0 commit comments

Comments
 (0)