Skip to content

Instantly share code, notes, and snippets.

@wtask
Last active September 3, 2021 20:49
Show Gist options
  • Save wtask/07b8355c8997884af70bb9c4590b1c94 to your computer and use it in GitHub Desktop.
Save wtask/07b8355c8997884af70bb9c4590b1c94 to your computer and use it in GitHub Desktop.
Windows/WSL Golang dependency checker (go-mod-outdated wrapper)
#!/bin/sh
echo Checking Golang outdated dependencies...
echo
if [ -f "./go.mod" ]; then
echo $(head -n 1 ./go.mod)
go.exe list -u -m -json all | go-mod-outdated.exe -update -direct
else
echo " go.mod is missing"
fi;
echo
@echo off
echo Checking Golang outdated dependencies...
echo.
if exist go.mod (
powershell.exe Get-Content go.mod -Head 1
go.exe list -u -m -json all | go-mod-outdated.exe -update -direct
) else (
echo go.mod is missing
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment