docs: none values should not take any value (#13141)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Creating an empty Optional[T] type should not require the value.

See:
https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configoptional/optional.go#L109
This commit is contained in:
Roger Coll 2025-06-04 11:20:39 +02:00 committed by GitHub
parent 14ecff64a5
commit 0f0e1f64de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ func Some[T any](value T) Optional[T] {
return Optional[T]{value: value, hasValue: true}
}
func None[T any](value T) Optional[T] {
func None[T any]() Optional[T] {
return Optional[T]{}
}