Blogger Information
Blog 70
fans 4
comment 5
visits 103775
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
GO:安装本地环境,运行hello world
JiaJieChen
Original
1327 people have browsed it

一.安装本地环境

  1. 进入golang社区 下载本地安装包
    https://studygolang.com/dl
  2. 根据自己电脑系统进行下载安装
  3. 更改go env 文件,开启 module,更换镜像源

    go env -w GO111MODULE=on
    go env -w GOPROXY=https://goproxy.cn

  4. 安装vs code 或 goland 编辑器


二.创建go文件 xxx.go

  • go 代码块
  1. package main
  2. import "fmt"
  3. func main() {
  4. fmt.Println("hello world");
  5. }
  • 打开终端输入

    go run xxx.go 执行文件

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!