go mod edit
parent
1da4c4a3f5
commit
f74d96e3a9
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
First time:
|
First time:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
go mod init
|
go mod init
|
||||||
```
|
```
|
||||||
|
|
||||||
Daily workflow:
|
Daily workflow:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
# Update modules
|
# Update modules
|
||||||
go get -u ./...
|
go get -u ./...
|
||||||
|
|
||||||
|
@ -24,10 +24,16 @@ go mod vendor
|
||||||
|
|
||||||
Outside modules:
|
Outside modules:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
GOMODULE11=on go get example.com/foo/bar
|
GOMODULE11=on go get example.com/foo/bar
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Update go version in `go.mod`:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
go mod edit -go-1.xy
|
||||||
|
```
|
||||||
|
|
||||||
In world of corporation, we work with private repository, add to `~/.bashrc`, `~/.zshrc`:
|
In world of corporation, we work with private repository, add to `~/.bashrc`, `~/.zshrc`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|
Loading…
Reference in New Issue