Skip to content

Commit d95e8ab

Browse files
authored
Merge pull request #2 from psampaz/readme_update
Added help and shortcut section in the README
2 parents f86afe7 + b38415e commit d95e8ab

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,38 @@ go list -u -m -json all | go-mod-outdated -direct
7171
If you want to see only the direct depedencies that have updates run
7272

7373
```
74-
go list -u -m -json all | go-mod-outdated -update -direct
74+
go list -u -m -json all | go-mod-outdated -update -direct
7575
```
7676

77+
### Help
78+
79+
In order to see details about the usage of the command use the **-h** or **-help** flag
80+
81+
```
82+
$ go-mod-outdated -help
83+
84+
Usage of go-mod-outdated:
85+
-direct
86+
List only direct modules
87+
-update
88+
List only modules with updates
89+
```
90+
91+
### Shortcut
92+
93+
If **go list -u -m -json all | go-mod-outdated -update -direct** seems too difficult to use or remember you can create
94+
a shortcut using an alias. In linux try one of the following:
95+
96+
```
97+
alias gmo="go list -u -m -json all | go-mod-outdated"
98+
99+
alias gmod="go list -u -m -json all | go-mod-outdated -direct"
100+
101+
alias gmou="go list -u -m -json all | go-mod-outdated -update"
102+
103+
alias gmodu="go list -u -m -json all | go-mod-outdated -direct -update"
104+
```
105+
77106
## Real Example
78107

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

0 commit comments

Comments
 (0)