Skip to content

Conversation

@eandre
Copy link
Member

@eandre eandre commented Nov 22, 2025

This adds a new encore.dev/types/option package for Encore.go, with a new type option.Option[T] for representing optional values.

This improves Encore's support for representing optional types in APIs. It's also something that we've internally found to be useful again and again in large code bases, where it's difficult to keep track of whether a pointer value *T means the type is nullable or not.

@encore-cla
Copy link

encore-cla bot commented Nov 22, 2025

All committers have signed the CLA.

ekerfelt
ekerfelt previously approved these changes Nov 26, 2025
@eandre eandre force-pushed the push-mpkuzszpvytv branch 5 times, most recently from 326748c to d915b7e Compare November 27, 2025 08:07
This adds a new `encore.dev/types/option` package for Encore.go,
with a new type option.Option[T] for representing optional values.

This improves Encore's support for representing optional types in APIs.
It's also something that we've internally found to be useful again and again
in large code bases, where it's difficult to keep track of whether a pointer value
*T means the type is nullable or not.
@eandre eandre requested a review from ekerfelt November 27, 2025 11:19
@eandre eandre merged commit 7f8d533 into main Nov 27, 2025
3 of 5 checks passed
@eandre eandre deleted the push-mpkuzszpvytv branch November 27, 2025 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants