Skip to content

Instantly share code, notes, and snippets.

@smugen
Created October 12, 2012 13:14
Show Gist options
  • Save smugen/3879136 to your computer and use it in GitHub Desktop.
Save smugen/3879136 to your computer and use it in GitHub Desktop.
golang Go tools switcher batch for Windows 64 / 32 cross-compiling
IF "%GOCC_OLD_PATH%" NEQ "" GOTO restorepath
:savepath
ECHO save PATH to GOCC_OLD_PATH
SET GOCC_OLD_PATH=%PATH%
GOTO oldpathdone
:restorepath
ECHO restore PATH from GOCC_OLD_PATH
PATH %GOCC_OLD_PATH%
:oldpathdone
PATH %GOROOT%\bin;%PATH%
ECHO ========================================
ECHO go env
ECHO ----------------------------------------
go env
ECHO ========================================
ECHO go tool
ECHO ----------------------------------------
go tool
@ECHO OFF
SET GOROOT=C:\Go32
goccpath.bat
@ECHO OFF
SET GOROOT=C:\Go
goccpath.bat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment