From c2d9d3cbaedad1e5e424ef4fe144d486ed3b41b9 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Thu, 10 Jul 2025 02:15:57 +0000 Subject: [PATCH 1/2] Adding API fix to avoid breaking changes --- .../GolangAppHostingExtension.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/CommunityToolkit.Aspire.Hosting.Golang/GolangAppHostingExtension.cs b/src/CommunityToolkit.Aspire.Hosting.Golang/GolangAppHostingExtension.cs index 23f3b453b..4e588da47 100644 --- a/src/CommunityToolkit.Aspire.Hosting.Golang/GolangAppHostingExtension.cs +++ b/src/CommunityToolkit.Aspire.Hosting.Golang/GolangAppHostingExtension.cs @@ -8,6 +8,17 @@ namespace Aspire.Hosting; /// public static class GolangAppHostingExtension { + /// + /// Adds a Golang application to the application model. Executes the executable Golang app. + /// + /// The to add the resource to. + /// The name of the resource. + /// The working directory to use for the command. If null, the working directory of the current process is used. + /// The optinal arguments to be passed to the executable when it is started. + /// A reference to the . + public static IResourceBuilder AddGolangApp(this IDistributedApplicationBuilder builder, [ResourceName] string name, string workingDirectory, string[] args) + => AddGolangApp(builder, name, workingDirectory, args); + /// /// Adds a Golang application to the application model. Executes the executable Golang app. /// @@ -43,7 +54,7 @@ public static IResourceBuilder AddGolangApp(this ID return builder.AddResource(resource) .WithGolangDefaults() - .WithArgs(allArgs.ToArray()); + .WithArgs(allArgs); } private static IResourceBuilder WithGolangDefaults( From 895ba6e67c735c7a93640d0b43eeb27a02c502cd Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Thu, 10 Jul 2025 02:29:43 +0000 Subject: [PATCH 2/2] shouldn't ahve changed that --- .../GolangAppHostingExtension.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CommunityToolkit.Aspire.Hosting.Golang/GolangAppHostingExtension.cs b/src/CommunityToolkit.Aspire.Hosting.Golang/GolangAppHostingExtension.cs index 4e588da47..d451f31ee 100644 --- a/src/CommunityToolkit.Aspire.Hosting.Golang/GolangAppHostingExtension.cs +++ b/src/CommunityToolkit.Aspire.Hosting.Golang/GolangAppHostingExtension.cs @@ -54,7 +54,7 @@ public static IResourceBuilder AddGolangApp(this ID return builder.AddResource(resource) .WithGolangDefaults() - .WithArgs(allArgs); + .WithArgs([.. allArgs]); } private static IResourceBuilder WithGolangDefaults(