CommunityToolkit.Aspire.Hosting.Golang
9.1.0
Prefix Reserved
dotnet add package CommunityToolkit.Aspire.Hosting.Golang --version 9.1.0
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.Golang -Version 9.1.0
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Golang" Version="9.1.0" />
paket add CommunityToolkit.Aspire.Hosting.Golang --version 9.1.0
#r "nuget: CommunityToolkit.Aspire.Hosting.Golang, 9.1.0"
// Install CommunityToolkit.Aspire.Hosting.Golang as a Cake Addin #addin nuget:?package=CommunityToolkit.Aspire.Hosting.Golang&version=9.1.0 // Install CommunityToolkit.Aspire.Hosting.Golang as a Cake Tool #tool nuget:?package=CommunityToolkit.Aspire.Hosting.Golang&version=9.1.0
CommunityToolkit.Aspire.Hosting.Golang library
Provides extensions methods and resource definitions for the .NET Aspire AppHost to support running Golang applications.
Getting Started
Install the package
In your AppHost project, install the package using the following command:
dotnet add package CommunityToolkit.Aspire.Hosting.Golang
Example usage
Then, in the Program.cs file of AppHost
, define a Golang resource, then call AddGolangApp
:
var golang = builder.AddGolangApp("golang", "../gin-api")
.WithHttpEndpoint(env: "PORT");
The PORT
environment variable is used to determine the port the Golang application should listen on. It is randomly assigned by the .NET Aspire. The name of the environment variable can be changed by passing a different value to the WithHttpEndpoint
method.
To have the Golang application listen on the correct port, you can use the following code in your Golang application:
r.Run(":"+os.Getenv("PORT"))
Additional Information
https://learn.microsoft.com/dotnet/aspire/community-toolkit/hosting-golang
Feedback & contributing
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. |
-
net8.0
- Aspire.Hosting (>= 9.0.0)
-
net9.0
- Aspire.Hosting (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
9.1.0 | 66 | 12/12/2024 |
9.1.0-beta.112 | 0 | 12/18/2024 |
9.1.0-beta.110 | 34 | 12/16/2024 |
9.1.0-beta.109 | 38 | 12/12/2024 |
9.0.1-beta.108 | 33 | 12/12/2024 |
9.0.1-beta.107 | 36 | 12/11/2024 |
9.0.1-beta.106 | 37 | 12/12/2024 |
9.0.1-beta.104 | 35 | 12/11/2024 |
9.0.1-beta.102 | 37 | 12/6/2024 |
9.0.1-beta.99 | 38 | 12/6/2024 |
9.0.1-beta.98 | 42 | 12/6/2024 |
9.0.1-beta.95 | 35 | 12/5/2024 |
9.0.1-beta.94 | 39 | 12/5/2024 |
9.0.1-beta.93 | 30 | 12/2/2024 |
9.0.1-beta.92 | 39 | 11/30/2024 |
9.0.1-beta.91 | 35 | 11/30/2024 |
9.0.1-beta.90 | 37 | 11/29/2024 |
9.0.1-beta.89 | 39 | 11/29/2024 |
9.0.1-beta.88 | 35 | 11/27/2024 |
9.0.1-beta.87 | 38 | 11/27/2024 |
9.0.1-beta.86 | 40 | 11/27/2024 |
9.0.1-beta.84 | 35 | 11/24/2024 |
9.0.1-beta.83 | 41 | 11/22/2024 |
9.0.1-beta.82 | 42 | 11/21/2024 |
9.0.1-beta.81 | 30 | 11/19/2024 |
9.0.1-beta.80 | 31 | 11/19/2024 |
9.0.1-beta.79 | 33 | 11/19/2024 |
9.0.1-beta.77 | 40 | 11/15/2024 |
9.0.0 | 107 | 11/15/2024 |
9.0.0-beta.76 | 41 | 11/14/2024 |
9.0.0-beta.75 | 32 | 11/14/2024 |
9.0.0-beta.74 | 32 | 11/14/2024 |
9.0.0-beta.73 | 38 | 11/14/2024 |
9.0.0-beta.72 | 36 | 11/14/2024 |
9.0.0-beta.71 | 41 | 11/13/2024 |
9.0.0-beta.70 | 40 | 11/13/2024 |
9.0.0-beta.69 | 36 | 11/13/2024 |
9.0.0-beta.68 | 37 | 11/13/2024 |
9.0.0-beta.67 | 36 | 11/13/2024 |
9.0.0-beta.66 | 38 | 11/13/2024 |
9.0.0-beta.63 | 41 | 11/12/2024 |
9.0.0-beta.54 | 40 | 10/31/2024 |
9.0.0-beta.53 | 35 | 10/29/2024 |
8.3.0 | 89 | 10/29/2024 |
8.3.0-beta.51 | 38 | 10/29/2024 |
8.3.0-beta.50 | 42 | 10/28/2024 |
8.3.0-beta.49 | 45 | 10/28/2024 |
8.3.0-beta.48 | 35 | 10/28/2024 |
8.3.0-beta.47 | 37 | 10/28/2024 |
8.3.0-beta.46 | 36 | 10/27/2024 |
8.3.0-beta.45 | 40 | 10/25/2024 |
8.3.0-beta.44 | 40 | 10/25/2024 |
8.3.0-beta.43 | 36 | 10/25/2024 |
8.3.0-beta.42 | 39 | 10/24/2024 |
8.2.1 | 92 | 10/23/2024 |
8.2.1-beta.40 | 33 | 10/23/2024 |
8.2.1-beta.39 | 37 | 10/23/2024 |
8.2.1-beta.38 | 40 | 10/23/2024 |
8.2.1-beta.37 | 40 | 10/23/2024 |
8.2.1-beta.36 | 45 | 10/23/2024 |
8.2.1-beta.35 | 43 | 10/23/2024 |
8.2.0-beta.34 | 46 | 10/23/2024 |
8.2.0-beta.33 | 44 | 10/23/2024 |
8.2.0-beta.32 | 39 | 10/22/2024 |
1.0.0-beta.60 | 49 | 11/11/2024 |
1.0.0-beta.58 | 35 | 11/4/2024 |
1.0.0-beta.57 | 39 | 11/1/2024 |
1.0.0-beta.56 | 37 | 11/1/2024 |
1.0.0-beta.55 | 36 | 11/1/2024 |