当前位置:网站首页>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
浏览器访问
边栏推荐
猜你喜欢
Day11 Shell scripting basics
typescript34-class的基本使用
datagrip 报错 “The specified database userpassword combination is rejected...”的解决方法
datax与datax-web安装部署
Test Cases: Four-Step Test Design Approach
电子制造仓储条码管理系统解决方案
Pytorch seq2seq model architecture to achieve English translation tasks
Why is on-chain governance so important, and how will Polkadot Gov 2.0 lead the development of on-chain governance?
6-25漏洞利用-irc后门利用
Pcie the inbound and outbound
随机推荐
Can‘t connect to MySQL server on ‘localhost3306‘ (10061) 简洁明了的解决方法
Some insights from 5 years of automated testing experience: UI automation must overcome these 10 pits
Byte taught me a hard lesson: When a crisis comes, you don't even have time to prepare...
C语言实验六 一维数组程序设计
理解分布式系统中的缓存架构(下)
Day11 Shell scripting basics
安全(2)
创新项目实战之智能跟随机器人原理与代码实现
关于MySQL的数据插入(高级用法)
typescript35-class的构造函数
typescript31-any类型
typescript32-ts中的typeof
typescript33-typescript高级概述
ofstream,ifstream,fstream读写文件
Day.js 常用方法
Flink_CDC搭建及简单使用
C语言实验九 函数(一)
信息收集之目录扫描-dirbuster
Flask gets post request parameters
IDEA找不到Database解决方法