You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: style.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,10 @@ The config JSON isn't enough of a UI to be worth jumping through string <-> inte
16
16
For example, `CAP_KILL` instead of `KILL` in [**`linux.capabilities`**][capabilities].
17
17
The redundancy reduction from removing the namespacing prefix is not useful enough to be worth trimming the upstream identifier ([source][keep-prefix]).
18
18
19
-
## Optional settings should have pointer Go types
19
+
## Optional settings should not have pointer Go types
20
20
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.
23
23
24
24
## Examples
25
25
@@ -88,10 +88,10 @@ Following is a fully populated example (not necessarily for copy/paste use)
0 commit comments