github.com/jamescostian/go-swagger@v0.30.4-0.20221130163922-68364d6b567b/hack/gomod-download.cmd (about) 1 @echo off 2 rem initiate the retry number 3 set retryNumber=0 4 set maxRetries=3 5 6 :RESTORE 7 go mod download 8 9 rem problem? 10 IF NOT ERRORLEVEL 1 GOTO :EOF 11 @echo Oops, go mod download exited with code %ERRORLEVEL% - let us try again! 12 set /a retryNumber=%retryNumber%+1 13 IF %reTryNumber% LSS %maxRetries% (GOTO :RESTORE) 14 @echo Sorry, we tried downloading go modules %maxRetries% times and all attempts were unsuccessful! 15 EXIT /B 1