refactor: drop golang.org/x/tools/go/vcs dependency
Proposed commit message
golang.org/x/tools/go/vcs is deprecated and was initially developed before module support was added. However we are not using vcs.Cmd at all, we're using one method to retrieve the vcs being used. As a quick fix, we can copy the method since it's short and self-contained and we don't need the whole package.
Checklist
- [ ] My code follows the style guidelines of this project
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have made corresponding change to the default configuration files
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added an entry in
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.
Disruptive User Impact
Author's Checklist
- [ ]
How to test this PR locally
Related issues
Use cases
Screenshots
Logs
This pull request does not have a backport label. If this is a bug or security fix, could you label this PR @kruskall? 🙏. For such, you'll need to label your PR with:
- The upcoming major version of the Elastic Stack
- The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)
To fixup this pull request, you need to add the backport labels for the needed branches, such as:
backport-v8./d.0is the label to automatically backport to the8./dbranch./dis the digit
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)