August 2019
Beginner to intermediate
798 pages
17h 2m
English
As you already know, in order to use our Go modules, we will need to create a Go program, which will be called useUpdatedV2.go and contains the following Go code:
package main
import (
v "github.com/mactsouk/myModule/v2"
)
func main() {
v.Version()
}
Still, there is no need to declare that you want to use the latest v2 version of the Go module because this is handled by Go, which is the main reason that useUpdatedV2.go and useV2.go are exactly the same.
Once again, a Docker image will be used for reasons of simplicity – the reason for using the cat(1) command to create useUpdatedV2.go is because that particular Docker image comes without vi(1) installed.
$ docker run --rm -it golang:1.12 root@ccfcd675e333:/go# cd /tmp/ ...
Read now
Unlock full access