CommunityToolkit.Aspire.Hosting.Golang 9.3.1-beta.265

Prefix Reserved
This is a prerelease version of CommunityToolkit.Aspire.Hosting.Golang.
dotnet add package CommunityToolkit.Aspire.Hosting.Golang --version 9.3.1-beta.265
                    
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.Golang -Version 9.3.1-beta.265
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Golang" Version="9.3.1-beta.265" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CommunityToolkit.Aspire.Hosting.Golang" Version="9.3.1-beta.265" />
                    
Directory.Packages.props
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Golang" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CommunityToolkit.Aspire.Hosting.Golang --version 9.3.1-beta.265
                    
#r "nuget: CommunityToolkit.Aspire.Hosting.Golang, 9.3.1-beta.265"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=CommunityToolkit.Aspire.Hosting.Golang&version=9.3.1-beta.265&prerelease
                    
Install CommunityToolkit.Aspire.Hosting.Golang as a Cake Addin
#tool nuget:?package=CommunityToolkit.Aspire.Hosting.Golang&version=9.3.1-beta.265&prerelease
                    
Install CommunityToolkit.Aspire.Hosting.Golang as a Cake Tool

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

https://github.com/CommunityToolkit/Aspire

Product 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.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.3.1-beta.265 44 4/15/2025
9.3.1-beta.264 41 4/15/2025
9.3.1-beta.263 40 4/15/2025
9.3.1-beta.262 41 4/15/2025
9.3.1-beta.260 118 4/10/2025
9.3.1-beta.259 119 4/8/2025
9.3.1-beta.258 114 4/8/2025
9.3.1-beta.257 117 4/8/2025
9.3.1-beta.256 113 4/8/2025
9.3.1-beta.255 116 4/8/2025
9.3.1-beta.254 113 4/8/2025
9.3.1-beta.253 117 4/1/2025
9.3.1-beta.252 99 3/27/2025
9.3.1-beta.250 103 3/27/2025
9.3.1-beta.249 101 3/27/2025
9.3.1-beta.248 94 3/27/2025
9.3.1-beta.247 95 3/27/2025
9.3.1-beta.244 442 3/25/2025
9.3.1-beta.242 438 3/24/2025
9.3.1-beta.241 116 3/19/2025
9.3.0 155 3/19/2025
9.3.0-beta.239 108 3/19/2025
9.2.2-beta.237 114 3/19/2025
9.2.2-beta.236 80 3/14/2025
9.2.2-beta.230 111 3/13/2025
9.2.2-beta.229 109 3/13/2025
9.2.2-beta.228 124 3/11/2025
9.2.2-beta.227 121 3/11/2025
9.2.2-beta.226 126 3/11/2025
9.2.2-beta.225 118 3/11/2025
9.2.2-beta.224 116 3/11/2025
9.2.2-beta.223 119 3/10/2025
9.2.2-beta.222 128 3/10/2025
9.2.2-beta.220 126 3/9/2025
9.2.2-beta.218 124 3/9/2025
9.2.2-beta.217 159 3/7/2025
9.2.2-beta.216 163 3/7/2025
9.2.2-beta.215 163 3/7/2025
9.2.2-beta.214 162 3/5/2025
9.2.2-beta.213 153 3/5/2025
9.2.2-beta.212 159 3/5/2025
9.2.2-beta.211 162 3/4/2025
9.2.2-beta.210 161 3/4/2025
9.2.2-beta.208 51 3/3/2025
9.2.1 103 3/3/2025
9.2.1-beta.207 82 3/2/2025
9.2.1-beta.206 54 3/1/2025
9.2.1-beta.205 52 2/27/2025
9.2.1-beta.204 47 2/26/2025
9.2.1-beta.203 50 2/26/2025
9.2.0 271 2/26/2025
9.2.0-beta.202 56 2/26/2025
9.2.0-beta.201 51 2/26/2025
9.2.0-beta.199 57 2/26/2025
9.2.0-beta.198 47 2/26/2025
9.1.1-beta.197 55 2/25/2025
9.1.1-beta.196 52 2/25/2025
9.1.1-beta.195 49 2/25/2025
9.1.1-beta.194 54 2/25/2025
9.1.1-beta.193 51 2/25/2025
9.1.1-beta.192 55 2/24/2025
9.1.1-beta.191 49 2/24/2025
9.1.1-beta.190 56 2/19/2025
9.1.1-beta.189 54 2/19/2025
9.1.1-beta.188 58 2/19/2025
9.1.1-beta.187 60 2/19/2025
9.1.1-beta.183 56 2/18/2025
9.1.1-beta.182 62 2/18/2025
9.1.1-beta.181 70 2/18/2025
9.1.1-beta.180 59 2/17/2025
9.1.1-beta.178 58 2/17/2025
9.1.1-beta.177 67 2/12/2025
9.1.1-beta.176 64 2/11/2025
9.1.1-beta.175 60 2/11/2025
9.1.1-beta.173 64 2/10/2025
9.1.1-beta.169 49 2/6/2025
9.1.1-beta.168 55 2/5/2025
9.1.1-beta.166 50 2/5/2025
9.1.1-beta.165 54 2/5/2025
9.1.1-beta.164 56 2/3/2025
9.1.1-beta.162 55 2/3/2025
9.1.1-beta.155 50 1/30/2025
9.1.1-beta.154 49 1/30/2025
9.1.1-beta.153 48 1/30/2025
9.1.1-beta.152 43 1/29/2025
9.1.1-beta.150 52 1/29/2025
9.1.1-beta.148 50 1/26/2025
9.1.1-beta.147 51 1/26/2025
9.1.1-beta.146 57 1/23/2025
9.1.1-beta.145 49 1/22/2025
9.1.1-beta.144 48 1/22/2025
9.1.1-beta.142 49 1/22/2025
9.1.1-beta.140 52 1/22/2025
9.1.1-beta.139 48 1/21/2025
9.1.1-beta.138 46 1/20/2025
9.1.1-beta.137 41 1/17/2025
9.1.1-beta.136 41 1/15/2025
9.1.1-beta.135 22 1/15/2025
9.1.1-beta.134 20 1/15/2025
9.1.1-beta.128 37 1/9/2025
9.1.1-beta.127 38 1/9/2025
9.1.1-beta.126 42 1/9/2025
9.1.1-beta.125 45 1/9/2025
9.1.1-beta.124 44 1/9/2025
9.1.0 737 12/12/2024
9.1.0-beta.123 59 1/3/2025
9.1.0-beta.122 61 1/3/2025
9.1.0-beta.121 61 1/2/2025
9.1.0-beta.120 53 12/30/2024
9.1.0-beta.119 49 12/30/2024
9.1.0-beta.118 56 12/30/2024
9.1.0-beta.116 57 12/30/2024
9.1.0-beta.114 51 12/30/2024
9.1.0-beta.113 53 12/30/2024
9.1.0-beta.112 57 12/18/2024
9.1.0-beta.110 58 12/16/2024
9.1.0-beta.109 60 12/12/2024
9.0.1-beta.108 54 12/12/2024
9.0.1-beta.107 61 12/11/2024
9.0.1-beta.106 57 12/12/2024
9.0.1-beta.104 55 12/11/2024
9.0.1-beta.102 55 12/6/2024
9.0.1-beta.99 56 12/6/2024
9.0.1-beta.98 59 12/6/2024
9.0.1-beta.95 52 12/5/2024
9.0.1-beta.94 56 12/5/2024
9.0.1-beta.93 46 12/2/2024
9.0.1-beta.92 56 11/30/2024
9.0.1-beta.91 54 11/30/2024
9.0.1-beta.90 54 11/29/2024
9.0.1-beta.89 57 11/29/2024
9.0.1-beta.88 54 11/27/2024
9.0.1-beta.87 56 11/27/2024
9.0.1-beta.86 56 11/27/2024
9.0.1-beta.84 53 11/24/2024
9.0.1-beta.83 59 11/22/2024
9.0.1-beta.82 65 11/21/2024
9.0.1-beta.81 46 11/19/2024
9.0.1-beta.80 48 11/19/2024
9.0.1-beta.79 50 11/19/2024
9.0.1-beta.77 59 11/15/2024
9.0.0 132 11/15/2024
9.0.0-beta.76 60 11/14/2024
9.0.0-beta.75 47 11/14/2024
9.0.0-beta.74 50 11/14/2024
9.0.0-beta.73 55 11/14/2024
9.0.0-beta.72 54 11/14/2024
9.0.0-beta.71 57 11/13/2024
9.0.0-beta.70 58 11/13/2024
9.0.0-beta.69 55 11/13/2024
9.0.0-beta.68 56 11/13/2024
9.0.0-beta.67 53 11/13/2024
9.0.0-beta.66 55 11/13/2024
9.0.0-beta.63 58 11/12/2024
9.0.0-beta.54 56 10/31/2024
9.0.0-beta.53 55 10/29/2024
8.3.0 106 10/29/2024
8.3.0-beta.51 54 10/29/2024
8.3.0-beta.50 56 10/28/2024
8.3.0-beta.49 58 10/28/2024
8.3.0-beta.48 51 10/28/2024
8.3.0-beta.47 51 10/28/2024
8.3.0-beta.46 52 10/27/2024
8.3.0-beta.45 57 10/25/2024
8.3.0-beta.44 56 10/25/2024
8.3.0-beta.43 53 10/25/2024
8.3.0-beta.42 57 10/24/2024
8.2.1 109 10/23/2024
8.2.1-beta.40 46 10/23/2024
8.2.1-beta.39 56 10/23/2024
8.2.1-beta.38 54 10/23/2024
8.2.1-beta.37 54 10/23/2024
8.2.1-beta.36 57 10/23/2024
8.2.1-beta.35 54 10/23/2024
8.2.0-beta.34 57 10/23/2024
8.2.0-beta.33 58 10/23/2024
8.2.0-beta.32 53 10/22/2024
1.0.0-beta.60 64 11/11/2024
1.0.0-beta.58 50 11/4/2024
1.0.0-beta.57 54 11/1/2024
1.0.0-beta.56 51 11/1/2024
1.0.0-beta.55 51 11/1/2024