File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/ldez/gomoddirectives
3
3
go 1.22.0
4
4
5
5
require (
6
- github.com/ldez/grignotin v0.8 .0
6
+ github.com/ldez/grignotin v0.9 .0
7
7
github.com/stretchr/testify v1.10.0
8
8
golang.org/x/mod v0.22.0
9
9
golang.org/x/tools v0.28.0
Original file line number Diff line number Diff line change 1
1
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c =
2
2
github.com/davecgh/go-spew v1.1.1 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
3
- github.com/ldez/grignotin v0.8 .0 h1:M9QeBN2qyPrqwqx+RhG7W2xKjyV7dRWKjNghbz7fkM0 =
4
- github.com/ldez/grignotin v0.8 .0 /go.mod h1:uaVTr0SoZ1KBii33c47O1M8Jp3OP3YDwhZCmzT9GHEk =
3
+ github.com/ldez/grignotin v0.9 .0 h1:MgOEmjZIVNn6p5wPaGp/0OKWyvq42KnzAt/DAb8O4Ow =
4
+ github.com/ldez/grignotin v0.9 .0 /go.mod h1:uaVTr0SoZ1KBii33c47O1M8Jp3OP3YDwhZCmzT9GHEk =
5
5
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM =
6
6
github.com/pmezard/go-difflib v1.0.0 /go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4 =
7
7
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA =
Original file line number Diff line number Diff line change 2
2
package gomoddirectives
3
3
4
4
import (
5
+ "context"
5
6
"fmt"
6
7
"go/token"
7
8
"regexp"
@@ -61,7 +62,7 @@ type Options struct {
61
62
62
63
// AnalyzePass analyzes a pass.
63
64
func AnalyzePass (pass * analysis.Pass , opts Options ) ([]Result , error ) {
64
- info , err := gomod .GetModuleInfo ()
65
+ info , err := gomod .GetModuleInfo (context . Background () )
65
66
if err != nil {
66
67
return nil , fmt .Errorf ("get information about modules: %w" , err )
67
68
}
Original file line number Diff line number Diff line change 1
1
package gomoddirectives
2
2
3
3
import (
4
+ "context"
4
5
"fmt"
5
6
"os"
6
7
"path/filepath"
@@ -11,7 +12,7 @@ import (
11
12
12
13
// GetModuleFile gets module file.
13
14
func GetModuleFile () (* modfile.File , error ) {
14
- goMod , err := goenv .GetOne (goenv .GOMOD )
15
+ goMod , err := goenv .GetOne (context . Background (), goenv .GOMOD )
15
16
if err != nil {
16
17
return nil , err
17
18
}
You can’t perform that action at this time.
0 commit comments