Skip to content

Commit

Permalink
Merge pull request #2 from psampaz/readme_update
Browse files Browse the repository at this point in the history
Added help and shortcut section in the README
  • Loading branch information
psampaz authored Apr 22, 2019
2 parents f86afe7 + b38415e commit d95e8ab
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,38 @@ go list -u -m -json all | go-mod-outdated -direct
If you want to see only the direct depedencies that have updates run

```
go list -u -m -json all | go-mod-outdated -update -direct
go list -u -m -json all | go-mod-outdated -update -direct
```

### Help

In order to see details about the usage of the command use the **-h** or **-help** flag

```
$ go-mod-outdated -help
Usage of go-mod-outdated:
-direct
List only direct modules
-update
List only modules with updates
```

### Shortcut

If **go list -u -m -json all | go-mod-outdated -update -direct** seems too difficult to use or remember you can create
a shortcut using an alias. In linux try one of the following:

```
alias gmo="go list -u -m -json all | go-mod-outdated"
alias gmod="go list -u -m -json all | go-mod-outdated -direct"
alias gmou="go list -u -m -json all | go-mod-outdated -update"
alias gmodu="go list -u -m -json all | go-mod-outdated -direct -update"
```

## Real Example

The following example is based on Hugo's go.mod (v0.53) (https://raw.githubusercontent.com/gohugoio/hugo/v0.53/go.mod)
Expand Down

0 comments on commit d95e8ab

Please sign in to comment.