朱纯树博客
VPS测评推荐网站
cloudacead cloudacead

linux安装golang开发环境

# golang 逐行读取文本文件

本文讲述 linux 下 golang 开发环境的搭建步骤。

# 1. 下载安装包

wget https://golang.google.cn/dl/go1.15.3.linux-amd64.tar.gz
tar -zxvf ./go1.15.3.linux-amd64.tar.gz -C /usr/local/

最新版本请前往https://golang.google.cn/dl/获取。

# 2. 配置环境变量

# go modules工程的依赖包会自动下载到GOROOT目录下
export GOROOT=/home/wangshibiao/programs/go
# golang安装包的根目录
export GOPATH=/home/wangshibiao/go
export PATH=$GOROOT/bin:$GOPATH/bin:$PATH

#go依赖包Go Modules下载代理, 解决下载依赖被墙的问题
export GOPROXY=https://goproxy.io

# 3. 创建工程

mkdir ./myapp
cd ./myapp
go mod init myapp

文章来源于互联网:
linux安装golang开发环境

赞(0) 打赏
未经允许不得转载:VPS测评推荐网站 - 朱纯树博客 » linux安装golang开发环境

评论 113

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #120

    My body just wants to make cancer this is a fear I live with, says Singer Wolf, who helps manage a family e commerce business and HIS Breast Cancer Awareness, a foundation she launched with her brother to bring awareness to BRCA mutations and cancer risk tamoxifen indications The Tanner camp site is pretty good with good fishing right there

    Chiellare12小时前回复
  2. #119

    Comprehensive side effect and adverse reaction information. Everything what you want to know about pills.
    ivermectin human
    Everything about medicine. Commonly Used Drugs Charts.

    Ronaldhax1天前回复
  3. #118

    Everything what you want to know about pills. Get information now.
    https://stromectolst.com/# stromectol prices
    Learn about the side effects, dosages, and interactions. Get warning information here.

    Jesselap2天前回复
  4. #117

    Long-Term Effects. Get here.
    ivermectin 6
    Long-Term Effects. Get information now.

    KevinCaf2天前回复
  5. #116

    viagra side effects Regardless of the can clomid fix erectile dysfunction cost, it would make it more gorgeous send me info on erectile dysfunction and magnificent as described in the historical records, but Emperor Liu was the first to fail

  6. #115

    Some trends of drugs. Read information now.
    https://stromectolst.com/# ivermectin 6mg
    Drugs information sheet. Read now.

    KevinCaf3天前回复
  7. #114

    Cautions. Cautions.
    ivermectin 2mg
    Long-Term Effects. Actual trends of drug.

    Ronaldhax3天前回复
  8. #113

    Commonly Used Drugs Charts. Comprehensive side effect and adverse reaction information.
    ivermectin uk
    Get warning information here. drug information and news for professionals and consumers.

    Zacharybor3天前回复