当前位置:网站首页>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
浏览器访问
边栏推荐
- About MySQL data insertion (advanced usage)
- 6-24漏洞利用-vnc密码破解
- MySQL——增删查改操作
- C语言实验七 二维数组程序设计
- 信息化和数字化的本质区别是什么?
- 成都openGauss用户组招募啦!
- 接口(第九天)
- ECMAScript 2022 正式发布,有你了解过的吗?
- Constructor instance method inheritance of typescript38-class (implement)
- "Introduction to Natural Language Processing Practice" Question Answering Robot Based on Knowledge Graph
猜你喜欢
typescript35-class的构造函数
软件测试功能测试全套常见面试题【开放性思维题】面试总结4-3
Docker安装canal、mysql进行简单测试与实现redis和mysql缓存一致性
Kubernetes — Flannel
【Brush the title】Family robbery
datagrip 报错 “The specified database userpassword combination is rejected...”的解决方法
哈希表
浅谈国产ERP的“横纵竖”三向发展态势
Flink_CDC construction and simple use
Understand the big model in seconds | 3 steps to get AI to write a summary
随机推荐
华为5年女测试工程师离职:多么痛的领悟...
Can‘t connect to MySQL server on ‘localhost3306‘ (10061) 简洁明了的解决方法
Flink_CDC construction and simple use
60种特征工程操作:使用自定义聚合函数【收藏】
flex布局中使用flex-wrap实现换行
【图像融合】基于加权和金字塔实现图像融合附matlab代码
pcie inbound和outbound关系
Interview: Briefly describe a project you are involved in
Local storage in Kubernetes
Day11 Shell scripting basics
GO开发环境配置
Kubernetes — 核心资源对象 — Controller
6-25漏洞利用-irc后门利用
Detailed explanation of fastjson
Constructor instance method inheritance of typescript38-class (implement)
安全(2)
datagrip连接mysql数据库
安全(1)
秒懂大模型 | 3步搞定AI写摘要
Markdown (CSDN) MD编辑器(四)- 漂亮表格(表格背景色、跨行、跨列)