Skip to content

Specify the Path of the Golang Executable #755

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

Conversation

mfcollins3
Copy link
Contributor

Closes #754

I enhanced GolangAppHostingExtension to define a new override of AddGolangApp that allows specifying the path of the Golang executable relative to the working directory. This is useful for scenarios where the Golang executable is in a cmd subdirectory, but the working directory needs to be the root of the project for accessing resources relative to the working directory at runtime. It is also useful when there are more than one executable in a Go module.

I updated the existing AddGolangApp method to call the new overload passing . as the executable path. This will support existing consumers without breaking their integrations.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

I enhanced GolangAppHostingExtension to define a new override of
AddGolangApp that allows specifying the path of the Golang executable
relative to the working directory. This is useful for scenarios where
the Golang executable is in a `cmd` subdirectory, but the working
directory needs to be the root of the project for accessing resources
relative to the working directory at runtime. It is also useful when
there are more than one Golang executable in a Go module.

Resolves CommunityToolkit#754
@tommasodotNET
Copy link
Contributor

tommasodotNET commented Jul 19, 2025

Thank you for your contribution! I'm currently oof, I'll be back on the 26th, and I'll review this pr asap 🙂

@github-actions github-actions bot added the Stale label Jul 25, 2025
@github-actions github-actions bot closed this Jul 27, 2025
@mfcollins3
Copy link
Contributor Author

Thank you for your contribution! I'm currently oof, I'll be back on the 26th, and I'll review this pr asap 🙂

@tommasodotNET This PR got closed. Can you re-open it?

@tommasodotNET tommasodotNET reopened this Jul 27, 2025
Copy link
Contributor

@tommasodotNET tommasodotNET left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@github-actions github-actions bot removed the Stale label Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Add Executable Path for Go Application
2 participants