diff --git a/src/CommunityToolkit.Aspire.Hosting.Golang/GolangAppHostingExtension.cs b/src/CommunityToolkit.Aspire.Hosting.Golang/GolangAppHostingExtension.cs index 23f3b453b..d451f31ee 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(