Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task for go-mod-upgrade Go module command #96

Merged
merged 1 commit into from
Apr 28, 2021

Conversation

svengreb
Copy link
Owner

Resolves #95

The github.com/oligot/go-mod-upgrade [1] Go module provides the
`go-mod-upgrade` command, a tool that to update outdated Go module
dependencies interactively.

To configure and run the `go-mod-upgrade` command,
the new `task.GoModule` [2] has been implemented in the new
`gomodupgrade` [3] package. It can be run using a command runner [4]
that handles tasks of kind `KindGoModule` [5].

The task is customizable through the following functions:

- `WithEnv(map[string]string) gomodupgrade.Option` - sets the task
  specific environment.
- `WithExtraArgs(...string) gomodupgrade.Option` - sets additional
  arguments to pass to the command.
- `WithModulePath(string) gomodupgrade.Option` - sets the module import
  path.
- `WithModuleVersion(*semver.Version) gomodupgrade.Option` - sets the
  module version.

The `Elder` [6] reference implementation provides the new `GoModUpgrade`
method [7].

[1]: https://github.com/oligot/go-mod-upgrade
[2]: https://pkg.go.dev/github.com/svengreb/wand/pkg/task#GoModule
[3]: https://pkg.go.dev/github.com/svengreb/wand/pkg/task/gofumpt
[4]: https://pkg.go.dev/github.com/svengreb/wand/pkg/task#Runner
[5]: https://pkg.go.dev/github.com/svengreb/wand/pkg/task#KindGoModule
[6]: https://pkg.go.dev/github.com/svengreb/wand/pkg/elder
[7]: https://pkg.go.dev/github.com/svengreb/wand/pkg/elder#Elder.GoModUpgrade

GH-95
@svengreb svengreb added this to the 0.6.0 milestone Apr 28, 2021
@svengreb svengreb self-assigned this Apr 28, 2021
@svengreb svengreb merged commit c944173 into main Apr 28, 2021
@svengreb svengreb deleted the feature/gh-95-task-for-go-mod-upgrade-mod-cmd branch April 28, 2021 20:06
@svengreb svengreb removed their assignment Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task for go-mod-upgrade Go module command
1 participant