This commit is contained in:
oneao committed 2025-07-31 17:32:19 +08:00
1 parent ba4506baf7
commit 5ef02d648a
6 files changed
+105 -5

No files matched your search

@@ -16,11 +16,6 @@ export default defineConfig({
server: {
host: '0.0.0.0',
https: true
},
resolve: {
alias: {
'@': path.resolve(__dirname, 'src')
}
}
})
```
Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

@@ -30,3 +30,68 @@ go version
go version go1.24.5 windows/amd64
```
## GoModules 设置
### 全局设置
开启模块支持
```bash
go env -w GO111MODULE=on
```
设置代理
```bash
# 官网全球代理
go env -w GOPROXY=https://goproxy.io,direct
# 七牛云代理
go env -w GOPROXY=https://goproxy.cn,direct
```
取消代理
```bash
go env -w GOPROXY=direct
```
关闭校验:当你下载某个模块时,Go 会从 `GOSUMDB` 查询并校验它的哈希值(与 `go.sum` 中对应),确保依赖内容的完整性和安全性。
```bash
go env -w GOSUMDB=of
```
检查是否生效 ,打开 `cmd` 输入
```bash
go env GOPROXY
```
输出 `https://goproxy.cn,direct` 的话即代表成功
### IDEA设置
![image-20250731132955704](./assets/%E5%AE%89%E8%A3%85%E4%B8%8E%E9%85%8D%E7%BD%AE/image-20250731132955704.png)
设置成功后
![image-20250731133006015](./assets/%E5%AE%89%E8%A3%85%E4%B8%8E%E9%85%8D%E7%BD%AE/image-20250731133006015.png)
## GoPath 设置
### 全局设置
```bash
go env -w GOPATH="D:\devtool\golang\gopath"
```
### IDEA设置
![image-20250731132738448](./assets/%E5%AE%89%E8%A3%85%E4%B8%8E%E9%85%8D%E7%BD%AE/image-20250731132738448.png)
# GoLand创建项目