当前位置:网站首页>Win Go开发包安装配置、GoLand配置
Win Go开发包安装配置、GoLand配置
2022-08-02 01:33:00 【dreambyday】
Go语言开发包
下载
配置
- 先创建两个目录:goroot和gopath

- 安装刚才的msi文件,将安装目录指定为goroot
- 设置环境变量GOPATH为gopath目录

- 验证 win+r ->cmd->go env

出现如上信息则配置成功
IDE下载配置
下载
goland官方下载地址:https://www.jetbrains.com/zh-cn/go/download/
选择试用三十天(需要注册账户)
配置
file->settings 分别配置gopath和goroot


测试

创建main文件
代码
package main
import (
"fmt"
"net/http"
)
func helloWorld(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "hello world")
}
func main() {
http.HandleFunc("/", helloWorld)
http.ListenAndServe(":8080", nil)
}
启动:
go run main.go
浏览器访问
边栏推荐
猜你喜欢
随机推荐
IDEA如何运行web程序
Flask gets post request parameters
hash table
Why is on-chain governance so important, and how will Polkadot Gov 2.0 lead the development of on-chain governance?
Typescript31 - any type
Byte taught me a hard lesson: When a crisis comes, you don't even have time to prepare...
kubernetes之服务发现
dayjs时间处理库的基本使用
Rust P2P网络应用实战-1 P2P网络核心概念及Ping程序
IDEA版Postman插件Restful Fast Request,细节到位,功能好用
H5画布 canvas(一)canvas简介、绘制圆形矩形、案例饼状图绘制
飞桨开源社区季度报告来啦,你想知道的都在这里
【轮式里程计】
FlinkSQL CDC实现同步oracle数据到mysql
Reflex WMS中阶系列7:已经完成拣货尚未Load的HD如果要取消拣货,该如何处理?
Can't connect to MySQL server on 'localhost3306' (10061) Simple and clear solution
秒懂大模型 | 3步搞定AI写摘要
Detailed explanation of fastjson
字节给我狠狠上了一课:危机来的时候你连准备时间都没有...
关于MySQL的数据插入(高级用法)










