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 #95

Closed
svengreb opened this issue Apr 28, 2021 · 0 comments · Fixed by #96
Closed

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

svengreb opened this issue Apr 28, 2021 · 0 comments · Fixed by #96

Comments

@svengreb
Copy link
Owner

svengreb commented Apr 28, 2021

The github.com/oligot/go-mod-upgrade Go module provides the go-mod-upgrade command, a too to update outdated Go module dependencies interactively.

To configure and run the go-mod-upgrade command, a new task.GoModule will be implemented in a new gomodupgrade package. It can be be run using a command runner that handles tasks of kind KindGoModule.

The task will be 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 reference implementation will provide a new GoModUpgrade method.

@svengreb svengreb added this to the 0.6.0 milestone Apr 28, 2021
@svengreb svengreb self-assigned this Apr 28, 2021
svengreb added a commit that referenced this issue Apr 28, 2021
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 added a commit that referenced this issue Apr 28, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
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

Resolves GH-95
@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 a pull request may close this issue.

1 participant