go mod edit
parent
1da4c4a3f5
commit
f74d96e3a9
|
@ -2,13 +2,13 @@
|
|||
|
||||
First time:
|
||||
|
||||
```
|
||||
```sh
|
||||
go mod init
|
||||
```
|
||||
|
||||
Daily workflow:
|
||||
|
||||
```
|
||||
```sh
|
||||
# Update modules
|
||||
go get -u ./...
|
||||
|
||||
|
@ -24,10 +24,16 @@ go mod vendor
|
|||
|
||||
Outside modules:
|
||||
|
||||
```
|
||||
```sh
|
||||
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`:
|
||||
|
||||
```sh
|
||||
|
|
Loading…
Reference in New Issue