cyberark/secretless-broker

View on GitHub
bin/go_mod_tidy

Summary

Maintainability
Test Coverage
#!/bin/bash

##########
# Execute go mod tidy with the compat
# flag set to the same version in the
# go.mod file.
##########

go_version=$(grep -P "^go\s\d+\.\d+" go.mod | grep -oP "\d+\.\d+")

go mod tidy -compat="${go_version}"