mder/module_update.sh

13 lines
239 B
Bash
Raw Normal View History

2022-07-24 14:26:30 +08:00
#!/bin/bash
go mod tidy
match_required=$(cat go.mod | grep -zoE "\((.*?)\)" | grep -zoP "(?<=\()[^\)]*(?=\))" | awk -F ' ' '{if(NF==2){print $1}}')
for i in $match_required;do
echo $i "updating..."
go get -u "$i";
done
go mod tidy