Skip to content

Commit

Permalink
go_modules helper updates
Browse files Browse the repository at this point in the history
  • Loading branch information
thepwagner committed May 5, 2021
1 parent e1083b1 commit b9440df
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions go_modules/helpers/updatechecker/main.go
@@ -1,6 +1,7 @@
package updatechecker

import (
"context"
"errors"
"io/ioutil"
"regexp"
Expand Down Expand Up @@ -42,13 +43,9 @@ func GetUpdatedVersion(args *Args) (interface{}, error) {
return currentVersion, nil
}

modload.InitMod()

repo, err := modfetch.Lookup("direct", args.Dependency.Name)
if err != nil {
return nil, err
}
modload.LoadModFile(context.Background())

repo := modfetch.Lookup("direct", args.Dependency.Name)
versions, err := repo.Versions("")
if err != nil {
return nil, err
Expand Down

0 comments on commit b9440df

Please sign in to comment.