Skip to content

Adding API fix to avoid breaking changes #745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 10, 2025
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ namespace Aspire.Hosting;
/// </summary>
public static class GolangAppHostingExtension
{
/// <summary>
/// Adds a Golang application to the application model. Executes the executable Golang app.
/// </summary>
/// <param name="builder">The <see cref="IDistributedApplicationBuilder"/> to add the resource to.</param>
/// <param name="name">The name of the resource.</param>
/// <param name="workingDirectory">The working directory to use for the command. If null, the working directory of the current process is used.</param>
/// <param name="args">The optinal arguments to be passed to the executable when it is started.</param>
/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
public static IResourceBuilder<GolangAppExecutableResource> AddGolangApp(this IDistributedApplicationBuilder builder, [ResourceName] string name, string workingDirectory, string[] args)
=> AddGolangApp(builder, name, workingDirectory, args);

/// <summary>
/// Adds a Golang application to the application model. Executes the executable Golang app.
/// </summary>
Expand Down Expand Up @@ -43,7 +54,7 @@ public static IResourceBuilder<GolangAppExecutableResource> AddGolangApp(this ID

return builder.AddResource(resource)
.WithGolangDefaults()
.WithArgs(allArgs.ToArray());
.WithArgs([.. allArgs]);
}

private static IResourceBuilder<GolangAppExecutableResource> WithGolangDefaults(
Expand Down
Loading