build: add //go:build directives alongside // +build#313
Open
dlevy-msft-sql wants to merge 1 commit intomicrosoft:mainfrom
Open
build: add //go:build directives alongside // +build#313dlevy-msft-sql wants to merge 1 commit intomicrosoft:mainfrom
dlevy-msft-sql wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Go 1.17+ prefers //go:build syntax. Adding it alongside the legacy // +build directive ensures compatibility with both old and new Go versions. The go fmt tool will eventually update these, but having both ensures the build constraints work correctly across all supported Go versions.
There was a problem hiding this comment.
Pull request overview
This PR adds modern //go:build directives alongside existing // +build constraints in the winsspi package to improve compatibility with Go 1.17+ tooling. The changes follow the standard pattern established throughout the codebase and include minor code quality improvements.
Changes:
- Add
//go:build windowsdirectives to two winsspi package files - Align struct field formatting in
winsspi.go - Remove trailing whitespace
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| integratedauth/winsspi/winsspi.go | Add //go:build windows directive, align struct fields, remove trailing whitespace |
| integratedauth/winsspi/provider.go | Add //go:build windows directive |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #313 +/- ##
==========================================
+ Coverage 75.36% 75.45% +0.09%
==========================================
Files 34 34
Lines 6597 6597
==========================================
+ Hits 4972 4978 +6
+ Misses 1337 1333 -4
+ Partials 288 286 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds modern
//go:builddirectives alongside existing// +buildconstraints in the winsspi package for Go 1.17+ compatibility.Changes
integratedauth/winsspi/provider.go: Add//go:build windowsintegratedauth/winsspi/winsspi.go: Add//go:build windowsThis improves compatibility with modern Go tooling while maintaining backward compatibility. Also includes minor formatting improvements (struct field alignment, trailing whitespace removal) applied by go fmt.
Split from #306 for easier review