From c958d075e2bd871a0ecec56078a333c60908a61d Mon Sep 17 00:00:00 2001 From: "aspire-repo-bot[bot]" <268009190+aspire-repo-bot[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2026 16:46:37 +0000 Subject: [PATCH] Document Go options merging and numeric unions --- .../src/content/docs/app-host/go-apphost-conventions.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend/src/content/docs/app-host/go-apphost-conventions.mdx b/src/frontend/src/content/docs/app-host/go-apphost-conventions.mdx index 9eb29923fc..90a55ce688 100644 --- a/src/frontend/src/content/docs/app-host/go-apphost-conventions.mdx +++ b/src/frontend/src/content/docs/app-host/go-apphost-conventions.mdx @@ -28,6 +28,10 @@ builder.AddGoApp("api", "./api"). The [`WithHttpEndpoint` API reference](/reference/api/go/aspire.hosting/withhttpendpoint/) describes each field of `WithHttpEndpointOptions`. +If you pass more than one options struct to a method, the SDK merges them. A field that's set in a later struct replaces the same field in an earlier one, and nested structs and maps merge recursively. Callback fields, such as `Configure`, and the `CancellationToken` field are taken whole from the later struct. + +Where a parameter accepts a number or another type, such as the `value` of `WithField`, you can pass any Go numeric type, such as an untyped constant `3` (an `int`). The SDK sends all of them as JSON numbers. + ## Errors The SDK reports errors in two ways.