当前位置:网站首页>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
浏览器访问
边栏推荐
- Kubernetes — 核心资源对象 — 存储
- Byte taught me a hard lesson: When a crisis comes, you don't even have time to prepare...
- 6-25 Vulnerability Exploitation - irc Backdoor Exploitation
- Kubernetes — 核心资源对象 — 网络
- 【ORB_SLAM2】void Frame::ComputeImageBounds(const cv::Mat &imLeft)
- 接口(第九天)
- 电商库存系统的防超卖和高并发扣减方案
- 【ORB_SLAM2】SetPose、UpdatePoseMatrices
- Kubernetes之本地存储
- 使用百度EasyDL实现厂区工人抽烟行为识别
猜你喜欢

Image fusion based on weighted 】 and pyramid image fusion with matlab code

datagrip连接mysql数据库

【刷题篇】打家劫舍

datax与datax-web安装部署

Day11 Shell scripting basics

html+css+php+mysql实现注册+登录+修改密码(附完整代码)

typescript37-class的构造函数实例方法继承(extends)

typescript33-typescript高级概述

去经营企业吧

dbeaver连接MySQL数据库及错误Connection refusedconnect处理
随机推荐
Navicat data shows incomplete resolution
Two ways to pass feign exceptions: fallbackfactory and global processing Get server-side custom exceptions
6-25 Vulnerability Exploitation - irc Backdoor Exploitation
Day115. Shangyitong: Background user management: user lock and unlock, details, authentication list approval
dbeaver连接MySQL数据库及错误Connection refusedconnect处理
【刷题篇】打家劫舍
60种特征工程操作:使用自定义聚合函数【收藏】
6-25漏洞利用-irc后门利用
For effective automated testing, these software testing tools must be collected!!!
Huawei's 5-year female test engineer resigns: what a painful realization...
fastjson详解
ECMAScript 2022 正式发布,有你了解过的吗?
安全(2)
"Introduction to Natural Language Processing Practice" Question Answering Robot Based on Knowledge Graph
Mapped Statements collection does not contain value for的解决方法
飞桨开源社区季度报告来啦,你想知道的都在这里
三本毕业的我被腾讯拒绝了十四次,最终成功入职阿里
字节给我狠狠上了一课:危机来的时候你连准备时间都没有...
flex布局中使用flex-wrap实现换行
A full set of common interview questions for software testing functional testing [open thinking questions] interview summary 4-3
