溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

【環(huán)境篇】golang環(huán)境變量二三事(二)

發(fā)布時間:2020-04-27 11:23:37 來源:網(wǎng)絡(luò) 閱讀:544 作者:wx5e1abbbb0a5e5 欄目:編程語言

繼續(xù)上篇文章的學(xué)習(xí),今天來看看其他的環(huán)境變量。

GOEXE

The executable file name suffix (".exe" on Windows, "" on other systems).

編譯后的二進制文件后綴,在Windows平臺是".exe",在其他平臺是""。

GOFLAGS

這個變量看起來比較陌生,用的不多,我們看看文檔里是怎么解釋的:

A space-separated list of -flag=value settings to apply
to go commands by default, when the given flag is known by
the current command. Each entry must be a standalone flag.
Because the entries are space-separated, flag values must
not contain spaces. Flags listed on the command line
are applied after this list and therefore override it.

這段話大意是說GOFLAGS是個"-flag=value"的命令行參數(shù)列表,當(dāng)執(zhí)行g(shù)o命令時,默認會添加這個環(huán)境變量里設(shè)置的參數(shù)。

GOTMPDIR

The directory where the go command will write temporary source files, packages, and binaries.

go命令的產(chǎn)生的源碼、包、二進制文件存放的臨時文件夾。

GOTOOLDIR

The directory where the go tools (compile, cover, doc, etc...) are installed.

存放go的工具包的路徑。

未完待續(xù)。下篇主要講跟cgo有關(guān)的環(huán)境變量。


歡迎關(guān)注我的公眾號:onepunchgo,會整理相關(guān)的文檔和資料。

【環(huán)境篇】golang環(huán)境變量二三事(二)

向AI問一下細節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI