github.com/rafaeltorres324/go/src@v0.0.0-20210519164414-9fdf653a9838/clean.bat (about) 1 :: Copyright 2012 The Go Authors. All rights reserved. 2 :: Use of this source code is governed by a BSD-style 3 :: license that can be found in the LICENSE file. 4 5 @echo off 6 7 setlocal 8 9 set GOBUILDFAIL=0 10 11 go tool dist env -w -p >env.bat 12 if errorlevel 1 goto fail 13 call env.bat 14 del env.bat 15 echo. 16 17 if exist %GOTOOLDIR%\dist.exe goto distok 18 echo cannot find %GOTOOLDIR%\dist; nothing to clean 19 goto fail 20 :distok 21 22 "%GOBIN%\go" clean -i std 23 "%GOBIN%\go" tool dist clean 24 "%GOBIN%\go" clean -i cmd 25 26 goto end 27 28 :fail 29 set GOBUILDFAIL=1 30 31 :end 32 if x%GOBUILDEXIT%==x1 exit %GOBUILDFAIL%