u
This commit is contained in:
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设置
|
||||
|
||||

|
||||
|
||||
设置成功后
|
||||
|
||||

|
||||
|
||||
## GoPath 设置
|
||||
|
||||
### 全局设置
|
||||
|
||||
```bash
|
||||
go env -w GOPATH="D:\devtool\golang\gopath"
|
||||
```
|
||||
|
||||
### IDEA设置
|
||||
|
||||

|
||||
|
||||
# GoLand创建项目
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user