Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/frontend/config/redirects.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ export const redirects = {
'/integrations/devtools/flagd/': '/integrations/devtools/flagd/flagd-get-started/',
'/integrations/devtools/goff/': '/integrations/devtools/goff/goff-get-started/',
'/integrations/devtools/mailpit/': '/integrations/devtools/mailpit/mailpit-get-started/',
'/integrations/frameworks/go/': '/integrations/frameworks/go/go-get-started/',
'/integrations/frameworks/go-apps/': '/integrations/frameworks/go/go-get-started/',
'/integrations/frameworks/csharp-file-based-apps/': '/integrations/dotnet/csharp-file-based-apps/',
'/integrations/frameworks/maui/': '/integrations/dotnet/maui/',
'/fundamentals/service-defaults/': '/get-started/csharp-service-defaults/',
Expand Down
17 changes: 15 additions & 2 deletions src/frontend/config/sidebar/integrations.topics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ export const integrationTopics: StarlightSidebarTopicsUserConfig = {
},
],
},
{
{
label: 'SQLite',
collapsed: true,
items: [
Expand Down Expand Up @@ -1338,7 +1338,20 @@ export const integrationTopics: StarlightSidebarTopicsUserConfig = {
],
},
{ label: 'Dapr', slug: 'integrations/frameworks/dapr' },
{ label: 'Go', slug: 'integrations/frameworks/go-apps' },
{
label: 'Go',
collapsed: true,
items: [
{
label: 'Get started',
slug: 'integrations/frameworks/go/go-get-started',
},
{
label: 'Set up Go apps in the AppHost',
slug: 'integrations/frameworks/go/go-host',
},
],
},
{ label: 'Java', slug: 'integrations/frameworks/java' },
{
label: 'JavaScript and Node.js',
Expand Down
1 change: 1 addition & 0 deletions src/frontend/scripts/update-integrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const EXCLUDED_PACKAGES = [
'Aspire.RabbitMQ.Client.v7',
'CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps',
'CommunityToolkit.Aspire.Hosting.EventStore',
'CommunityToolkit.Aspire.Hosting.Golang',
'CommunityToolkit.Aspire.EventStore',
];
const OUTPUT_PATH = './src/data/aspire-integrations.json';
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/content/docs/community/thanks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ Aspire speaks many languages — thanks to these communities.
alongside Aspire.
</p>
<div class="thanks-card-links">
<a href="/integrations/frameworks/go-apps/" class="thanks-link-docs">
<a href="/integrations/frameworks/go/go-get-started/" class="thanks-link-docs">
<span class="thanks-book-icon" aria-hidden="true"></span> Docs
</a>
<a href="https://go.dev" class="thanks-link-project">
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/content/docs/get-started/app-host.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ architecture-beta
This architecture demonstrates a **Go API** connecting to a **PostgreSQL database**, with a **React frontend** consuming the API. The Go API uses the standard library's `net/http` package or frameworks like Gin or Echo and connects to PostgreSQL using libraries like pgx or database/sql. The React frontend is built with Vite and communicates with the API over HTTP.

<Aside type="tip">
The Go integration is provided by the [CommunityToolkit.Aspire.Hosting.Golang](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Golang) NuGet package. Learn more in the [Go integration](/integrations/frameworks/go-apps/) documentation.
The Go integration is provided by the [Aspire.Hosting.Go](https://www.nuget.org/packages/Aspire.Hosting.Go) NuGet package. Learn more in the [Go integration](/integrations/frameworks/go/go-get-started/) documentation.
</Aside>

</Pivot>
Expand Down
167 changes: 0 additions & 167 deletions src/frontend/src/content/docs/integrations/frameworks/go-apps.mdx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
title: Get started with the Go integration
description: Understand how the Aspire Go hosting integration runs Go apps from your AppHost and how to choose the right setup path.
---

import { LinkButton, Steps } from '@astrojs/starlight/components';
import ThemeImage from '@components/ThemeImage.astro';
import goIcon from '@assets/icons/go-icon.png';
import goLightIcon from '@assets/icons/go-light-icon.png';

<ThemeImage
light={goLightIcon}
dark={goIcon}
alt="Go logo"
width={100}
height={100}
zoomable={false}
classOverride="float-inline-left icon"
/>

The Aspire Go hosting integration lets you run Go applications alongside your other Aspire resources from the AppHost. Aspire runs Go apps with the local Go toolchain during development, wires them into the Aspire app model, supports service discovery and endpoint configuration, and can emit Dockerfile-based container build artifacts for deployment targets that need them.

:::caution[Community Toolkit package deprecated]
As of Aspire 13.4, Go hosting support is available in the official `Aspire.Hosting.Go` package. The previous `CommunityToolkit.Aspire.Hosting.Golang` package is deprecated because Go support has graduated into core Aspire. Use `Aspire.Hosting.Go` and `AddGoApp` / `addGoApp` for new Aspire 13.4+ applications.
:::

## Why use Go with Aspire

Adding Go apps through Aspire gives you:

- **One app model for every service.** Model Go applications, projects, containers, and backing services together in the AppHost.
- **Local development with the Go toolchain.** Aspire runs Go apps with commands such as `go run .` or `go run ./cmd/server` instead of requiring a container for every edit-run loop.
- **Endpoint and environment wiring.** Configure ports, environment variables, service discovery, and resource dependencies from the AppHost.
- **Dashboard visibility.** Go app resources appear in the Aspire dashboard with logs, status, endpoints, and lifecycle controls.
- **Publish-time container artifacts.** Deployment targets that need container build artifacts can use an existing Dockerfile or let Aspire generate one from the Go app resource.

## How the pieces fit together

The Go integration is a **hosting integration**. You install it in the AppHost, add one or more Go app resources, and configure how Aspire runs, debugs, and publishes each app.

```mermaid
architecture-beta

group apphost(server)[AppHost]
group goapp(server)[Go app]

service hosting(server)[Go hosting integration] in apphost
service resource(logos:go)[Go app resource] in apphost
service toolchain(logos:go)[Go toolchain] in goapp
service app(logos:go)[Go process] in goapp

hosting:R --> L:resource
resource:R --> L:toolchain
toolchain:R --> L:app
```

<Steps>

1. ### Set up Go apps in the AppHost

Add the `Aspire.Hosting.Go` hosting integration to your AppHost, then use `AddGoApp` / `addGoApp` to model a Go app resource. The host reference covers package installation, common Go layouts, app arguments, build options, Go module helper commands, Delve debugging, private modules, and publish behavior.

<LinkButton
variant="secondary"
iconPlacement="end"
icon="right-arrow"
href="/integrations/frameworks/go/go-host/"
>
Set up Go apps in the AppHost
</LinkButton>

2. ### Optionally try the Go AppHost templates

The `Aspire.Hosting.Go` integration works from C# and TypeScript AppHosts. Aspire also includes experimental Go AppHost and Go starter template support in the Aspire CLI. These templates use experimental Go AppHost APIs instead of the `Aspire.Hosting.Go` package.

<LinkButton
variant="secondary"
iconPlacement="end"
icon="right-arrow"
href="/integrations/frameworks/go/go-host/#experimental-go-apphost-templates"
>
Try the experimental Go templates
</LinkButton>

</Steps>

## See also

- [Go documentation](https://go.dev/doc/)
- [Go AppHost setup reference](/integrations/frameworks/go/go-host/)
- [Aspire integrations overview](/integrations/overview/)
Loading
Loading