update-go-mod/README.md

40 lines
950 B
Markdown
Raw Permalink Normal View History

2022-07-22 14:09:34 +00:00
# update-go-mod
2023-09-23 07:11:25 +00:00
[![Go](https://github.com/haunt98/update-go-mod/workflows/Go/badge.svg?branch=main)](https://github.com/haunt98/update-go-mod/actions)
[![Latest Version](https://img.shields.io/github/v/tag/haunt98/update-go-mod)](https://github.com/haunt98/update-go-mod/tags)
2022-07-22 15:55:14 +00:00
Only upgrade specific subset not all modules.
2022-07-22 16:11:07 +00:00
## Install
Should use Go version `>= 1.16`:
```sh
go install github.com/haunt98/update-go-mod/cmd/update-go-mod@latest
```
## Usage
2023-08-19 06:56:36 +00:00
Create local file `.deps` ([example](.deps)) or use url depends on your use
case:
2022-07-22 16:11:07 +00:00
```sh
# Default read from .deps
update-go-mod
# Read from URL
update-go-mod --deps-url "https://example.txt"
2023-08-15 12:28:11 +00:00
# Don't do anything
2022-07-22 16:11:07 +00:00
update-go-mod --dry-run
2023-08-15 12:00:22 +00:00
# Take a look
# Require GitHub access token in ~/.netrc
update-go-mod overlook
2022-07-22 16:11:07 +00:00
```
2022-07-22 14:09:34 +00:00
## Thanks
- [Managing dependencies](https://go.dev/doc/modules/managing-dependencies)
2023-08-19 06:56:36 +00:00
- [Bash one liners](https://blog.fredrb.com/2023/08/13/bash-one-liner-gomod/)