Skip to content

Commit 443fb34

Browse files
committed
Add coding guideline for optional fields.
Specify to use pointers to represent optional fields. This is a follow up to: open-telemetry#9478.
1 parent 2d25853 commit 443fb34

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,10 @@ To guarantee backward-compatible behavior, all configuration packages should sup
294294

295295
Users should always initialize the config struct with this function and overwrite anything as needed.
296296

297+
### Optional Fields
298+
299+
Use pointers to represent optional fields in configuration to distinguish between unset values and zero values.
300+
297301
### Startup Error Handling
298302

299303
Verify configuration during startup and fail fast if the configuration is invalid.

0 commit comments

Comments
 (0)