Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove comparable constraint from Optional (#6041)
* fix: remove comparable constraint from Optional This allows making slice types (`[]any`) optional, which is permitted at the API level, but wasn't allowed at the type constraint level. We previously used this constraint because it was assumed that a user might constraint an Optional manually, and not set `isSet`. However, this is an edge case that pokes into the private internals of `dagger.gen.go`, and we now have the `Opt` helper for this. Users doing this kind of access should be aware of what they're doing. Signed-off-by: Justin Chadwell <[email protected]> * feat: add OptEmpty helper to Go SDK This creates an empty optional - note that the type constraint cannot be automatically derived, at least in the current version of Go. Signed-off-by: Justin Chadwell <[email protected]> --------- Signed-off-by: Justin Chadwell <[email protected]>
- Loading branch information