当前位置:网站首页>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
浏览器访问
边栏推荐
- Understand the big model in seconds | 3 steps to get AI to write a summary
- 力扣 1374. 生成每种字符都是奇数个的字符串
- 内部类、异常简单介绍(第十天)
- GO开发环境配置
- 设备树学习
- 外包干了三年,废了...
- Mapped Statements collection does not contain value for的解决方法
- IDEA版Postman插件Restful Fast Request,细节到位,功能好用
- Pytorch seq2seq model architecture to achieve English translation tasks
- 大话西游创建角色失败解决
猜你喜欢

Test Cases: Four-Step Test Design Approach

Rust P2P Network Application Combat-1 P2P Network Core Concepts and Ping Program

Two ways to pass feign exceptions: fallbackfactory and global processing Get server-side custom exceptions

The characteristics and principle of typescript29 - enumeration type

飞桨开源社区季度报告来啦,你想知道的都在这里

mapbox使用教程

typescript35-class的构造函数

Flex layout in detail

【刷题篇】打家劫舍

力扣 1374. 生成每种字符都是奇数个的字符串
随机推荐
力扣 1161. 最大层内元素和
PHP直播源码实现简单弹幕效果的相关代码
ofstream,ifstream,fstream读写文件
Record the pits where an error occurs when an array is converted to a collection, and try to use an array of packaging types for conversion
The characteristics and principle of typescript29 - enumeration type
Day116. Shangyitong: Details of appointment registration ※
Oracle data to mysql FlinkSQL CDC to achieve synchronization
滴滴秋招提前批正式开始,现在投递免笔试
mapbox使用教程
Navicat data shows incomplete resolution
When paying attention to the "Internet +" model, you usually only focus on the "Internet +" model itself
flask获取post请求参数
Named parameter implementation of JDBC PreparedStatement
6-24漏洞利用-vnc密码破解
浅谈国产ERP的“横纵竖”三向发展态势
Detailed explanation of fastjson
6-25 Vulnerability Exploitation - irc Backdoor Exploitation
60种特征工程操作:使用自定义聚合函数【收藏】
kubernetes之服务发现
pcie inbound和outbound关系
