go mod edit

main
hau 2020-08-12 23:04:29 +07:00
parent 1da4c4a3f5
commit f74d96e3a9
1 changed files with 9 additions and 3 deletions

View File

@ -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