diff --git a/CREDITS b/CREDITS index 883cea4..fe5871e 100644 --- a/CREDITS +++ b/CREDITS @@ -159,8 +159,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================================ -github.com/google/go-github/v47 -https://github.com/google/go-github/v47 +github.com/google/go-github/v55 +https://github.com/google/go-github/v55 ---------------------------------------------------------------- Copyright (c) 2013 The go-github AUTHORS. All rights reserved. diff --git a/cli.go b/cli.go index 9903cb2..63de6f2 100644 --- a/cli.go +++ b/cli.go @@ -14,9 +14,10 @@ import ( "runtime" "time" - "github.com/google/go-github/v47/github" + "github.com/google/go-github/v55/github" "github.com/mitchellh/colorstring" "github.com/tcnksm/go-gitconfig" + "github.com/thediveo/enumflag/v2" ) const ( @@ -52,6 +53,20 @@ const ( defaultParallel = -1 ) +type SetLatest enumflag.Flag + +const ( + setLatestFalse SetLatest = iota + setLatestTrue + setLatestAuto +) + +var LatestIds = map[SetLatest][]string{ + setLatestFalse: {"false"}, + setLatestTrue: {"true"}, + setLatestAuto: {"auto"}, +} + // Debugf prints debug output when EnvDebug is set func Debugf(format string, args ...interface{}) { if env := os.Getenv(EnvDebug); len(env) != 0 { @@ -86,6 +101,7 @@ func (cli *CLI) Run(args []string) int { body string draft bool prerelease bool + latest SetLatest parallel int @@ -128,6 +144,12 @@ func (cli *CLI) Run(args []string) int { flags.BoolVar(&draft, "draft", false, "") flags.BoolVar(&prerelease, "prerelease", false, "") + flags.Var( + enumflag.New(&latest, "true", LatestIds, enumflag.EnumCaseInsensitive), + "latest", + "", + ) + flags.IntVar(¶llel, "parallel", defaultParallel, "") flags.IntVar(¶llel, "p", defaultParallel, "") @@ -260,6 +282,8 @@ func (cli *CLI) Run(args []string) int { } Debugf("Number of file to upload: %d", len(localAssets)) + Debugf("Set this release as latest: %s", latest) + // Create a GitHub client gitHubClient, err := NewGitHubClient(owner, repo, token, baseURLStr) if err != nil { @@ -287,6 +311,31 @@ func (cli *CLI) Run(args []string) int { ctx := context.TODO() + if latest == setLatestAuto { + latestRelease, err := ghr.GitHub.GetLatestRelease(ctx) + if err != nil { + fmt.Fprintf(cli.errStream, "Unable to fetch the latest release to compare versions: %s", err) + return ExitCodeError + } + + isLatestRelease, err := ghr.IsNewerSemverRelease(req, latestRelease) + if err != nil { + fmt.Fprintf(cli.errStream, "Could not compare current and latest semver releases: %s", err) + return ExitCodeError + } + if isLatestRelease { + latest = setLatestTrue + } else { + latest = setLatestFalse + } + + if latest == setLatestTrue { + req.MakeLatest = github.String("true") + } else { + req.MakeLatest = github.String("false") + } + } + if soft { _, err := ghr.GitHub.GetRelease(ctx, *req.TagName) @@ -410,6 +459,12 @@ Options: -draft Release as draft (Unpublish) +-latest + Set the release as the 'latest' release. Can be true, false, or auto. + Auto will set the release as 'latest' if the release names are valid + semver names and the current release is the highest version of recent + releases. + -prerelease Create prerelease diff --git a/ghr.go b/ghr.go index 63933d0..f9dd9fc 100644 --- a/ghr.go +++ b/ghr.go @@ -8,7 +8,8 @@ import ( "path/filepath" "time" - "github.com/google/go-github/v47/github" + "github.com/google/go-github/v55/github" + "github.com/hashicorp/go-version" "golang.org/x/sync/errgroup" ) @@ -74,6 +75,30 @@ func (g *GHR) CreateRelease(ctx context.Context, req *github.RepositoryRelease, return g.GitHub.CreateRelease(ctx, req) } +func (g *GHR) GetLatestRelease(ctx context.Context) (*github.RepositoryRelease, error) { + release, err := g.GitHub.GetLatestRelease(ctx) + if err != nil { + return nil, fmt.Errorf("Unable to fetch latest Github release: %w", err) + } + return release, err +} + +func (g *GHR) IsNewerSemverRelease(newRelease *github.RepositoryRelease, latestRelease *github.RepositoryRelease) (bool, error) { + newReleaseVer, error := version.NewVersion(*newRelease.TagName) + if error != nil { + return false, fmt.Errorf("Unable to parse new release version as semver%s: %w", *newRelease.TagName, error) + } + latestReleaseVer, error := version.NewVersion(*latestRelease.TagName) + if error != nil { + return false, fmt.Errorf("Unable to parse latest release version as semver %s: %w", *newRelease.TagName, error) + } + + if latestReleaseVer.LessThan(newReleaseVer) { + return true, nil + } + return false, nil +} + // DeleteRelease removes an existing release, if it exists. If it does not exist, // DeleteRelease returns an error func (g *GHR) DeleteRelease(ctx context.Context, releaseID int64, tag string) error { diff --git a/ghr_test.go b/ghr_test.go index fa51b88..527356d 100644 --- a/ghr_test.go +++ b/ghr_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/google/go-github/v47/github" + "github.com/google/go-github/v55/github" ) func TestGHR_CreateRelease(t *testing.T) { @@ -34,6 +34,42 @@ func TestGHR_CreateRelease(t *testing.T) { defer ghr.DeleteRelease(context.TODO(), *release.ID, testTag) } +func TestGHR_GetLatestRelease(t *testing.T) { + t.Parallel() + + githubClient := testGithubClient(t) + ghr := &GHR{ + GitHub: githubClient, + outStream: io.Discard, + } + + testTag := "v1.2.3" + + existingReq := &github.RepositoryRelease{ + TagName: github.String(testTag), + Draft: github.Bool(false), + MakeLatest: github.String("true"), + } + + newRelease, err := githubClient.CreateRelease(context.TODO(), existingReq) + if err != nil { + t.Fatalf("CreateRelease failed: %s", err) + } + + // Create an existing release before + existing, err := ghr.GetLatestRelease(context.TODO()) + if err != nil { + t.Fatalf("GetLatestRelease failed: %s", err) + } + + if newRelease.Name != existing.Name { + t.Fatalf("GetLatestRelease got release %s instead of release %s", *existing.Name, *newRelease.Name) + } + + defer ghr.DeleteRelease(context.TODO(), *existing.ID, testTag) + +} + func TestGHR_CreateReleaseWithExistingRelease(t *testing.T) { t.Parallel() diff --git a/github.go b/github.go index 3f8942f..7a27da9 100644 --- a/github.go +++ b/github.go @@ -12,7 +12,7 @@ import ( "time" "github.com/Songmu/retry" - "github.com/google/go-github/v47/github" + "github.com/google/go-github/v55/github" "golang.org/x/oauth2" ) @@ -26,6 +26,7 @@ var ( type GitHub interface { CreateRelease(ctx context.Context, req *github.RepositoryRelease) (*github.RepositoryRelease, error) GetRelease(ctx context.Context, tag string) (*github.RepositoryRelease, error) + GetLatestRelease(ctx context.Context) (*github.RepositoryRelease, error) GetDraftRelease(ctx context.Context, tag string) (*github.RepositoryRelease, error) EditRelease(ctx context.Context, releaseID int64, req *github.RepositoryRelease) (*github.RepositoryRelease, error) DeleteRelease(ctx context.Context, releaseID int64) error @@ -113,6 +114,7 @@ func (c *GitHubClient) CreateRelease(ctx context.Context, req *github.Repository func (c *GitHubClient) GetRelease(ctx context.Context, tag string) (*github.RepositoryRelease, error) { // Check Release whether already exists or not release, res, err := c.Repositories.GetReleaseByTag(context.TODO(), c.Owner, c.Repo, tag) + if err != nil { if res == nil { return nil, fmt.Errorf("failed to get release tag: %s %w", tag, err) @@ -129,6 +131,26 @@ func (c *GitHubClient) GetRelease(ctx context.Context, tag string) (*github.Repo return release, nil } +// GetRelease queries the GitHub API for a specified release object +func (c *GitHubClient) GetLatestRelease(ctx context.Context) (*github.RepositoryRelease, error) { + // Check Release whether already exists or not + release, res, err := c.Repositories.GetLatestRelease(context.TODO(), c.Owner, c.Repo) + if err != nil { + if res == nil { + return nil, fmt.Errorf("failed to find latest release: %w", err) + } + + // TODO(tcnksm): Handle invalid token + if res.StatusCode != http.StatusNotFound { + return nil, fmt.Errorf("get release tag: invalid status: %s %w", res.Status, err) + } + + return nil, ErrReleaseNotFound + } + + return release, nil +} + // GetDraftRelease queries the GitHub API for draft release with the specified tag func (c *GitHubClient) GetDraftRelease(ctx context.Context, tag string) (*github.RepositoryRelease, error) { const perPage = 100 diff --git a/github_test.go b/github_test.go index 1fb126e..a70c491 100644 --- a/github_test.go +++ b/github_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/google/go-github/v47/github" + "github.com/google/go-github/v55/github" ) const ( diff --git a/go.mod b/go.mod index 02d5339..beb1909 100644 --- a/go.mod +++ b/go.mod @@ -4,23 +4,29 @@ go 1.19 require ( github.com/Songmu/retry v0.1.0 - github.com/google/go-github/v47 v47.1.0 + github.com/google/go-github/v55 v55.0.0 + github.com/hashicorp/go-version v1.6.0 github.com/mattn/go-colorable v0.1.13 github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db github.com/tcnksm/go-gitconfig v0.1.2 github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e + github.com/thediveo/enumflag/v2 v2.0.4 golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 golang.org/x/sync v0.0.0-20220923202941-7f9b1623fab7 ) require ( - github.com/golang/protobuf v1.5.2 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect + github.com/cloudflare/circl v1.3.3 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/google/go-github v17.0.0+incompatible // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/mattn/go-isatty v0.0.16 // indirect - github.com/onsi/gomega v1.5.0 // indirect + github.com/spf13/cobra v1.7.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect golang.org/x/crypto v0.14.0 // indirect + golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/sys v0.13.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index 91eee91..6817a8b 100644 --- a/go.sum +++ b/go.sum @@ -1,57 +1,81 @@ +github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= +github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/Songmu/retry v0.1.0 h1:hPA5xybQsksLR/ry/+t/7cFajPW+dqjmjhzZhioBILA= github.com/Songmu/retry v0.1.0/go.mod h1:7sXIW7eseB9fq0FUvigRcQMVLR9tuHI0Scok+rkpAuA= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= +github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= +github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-github/v47 v47.1.0 h1:Cacm/WxQBOa9lF0FT0EMjZ2BWMetQ1TQfyurn4yF1z8= -github.com/google/go-github/v47 v47.1.0/go.mod h1:VPZBXNbFSJGjyjFRUKo9vZGawTajnWzC/YjGw/oFKi0= +github.com/google/go-github/v55 v55.0.0 h1:4pp/1tNMB9X/LuAhs5i0KQAE40NmiR/y6prLNb9x9cg= +github.com/google/go-github/v55 v55.0.0/go.mod h1:JLahOTA1DnXzhxEymmFF5PP2tSS9JVNj68mSZNDwskA= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/ginkgo/v2 v2.9.7 h1:06xGQy5www2oN160RtEZoTvnP2sPhEfePYmCDc2szss= +github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sirupsen/logrus v1.9.2 h1:oxx1eChJGI6Uks2ZC4W1zpLlVgqB8ner4EuQwV4Ik1Y= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/tcnksm/go-gitconfig v0.1.2 h1:iiDhRitByXAEyjgBqsKi9QU4o2TNtv9kPP3RgPgXBPw= github.com/tcnksm/go-gitconfig v0.1.2/go.mod h1:/8EhP4H7oJZdIPyT+/UIsG87kTzrzM4UsLGSItWYCpE= github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e h1:IWllFTiDjjLIf2oeKxpIUmtiDV5sn71VgeQgg6vcE7k= github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e/go.mod h1:d7u6HkTYKSv5m6MCKkOQlHwaShTMl3HjqSGW3XtVhXM= +github.com/thediveo/enumflag/v2 v2.0.4 h1:CPez2ZDJMkJ0iPiueJ6/vwsFeFy+w5kIJNFwxKPSUGo= +github.com/thediveo/enumflag/v2 v2.0.4/go.mod h1:K5VGebAdhHGZyVprL7WEnEJ3CA16YzWhDH2ERwddA0I= +github.com/thediveo/success v1.0.1 h1:NVwUOwKUwaN8szjkJ+vsiM2L3sNBFscldoDJ2g2tAPg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= +golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220923202941-7f9b1623fab7 h1:ZrnxWX62AgTKOSagEqxvb3ffipvEDX2pl7E1TdqLqIc= golang.org/x/sync v0.0.0-20220923202941-7f9b1623fab7/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= @@ -60,7 +84,5 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=