August 2019
Beginner to intermediate
798 pages
17h 2m
English
In this section, you are going to learn how to use v1.1.0 of the Go module we created. This time we are going to use a Docker image in order to be as independent from the machine we used for developing the module as possible. The command we will use to get the Docker image and going into its UNIX shell is the following:
$ docker run --rm -it golang:latest
root@884c0d188694:/go# cd /tmp
root@58c5688e3ee0:/tmp# go version
go version go1.13 linux/amd64
As you can see, the Docker image uses the latest version of Go, which at the time of writing is 1.13. In order to use one or more Go modules, you will need to create a Go program, which is called useUpdatedModule.go and contains the following Go code:
package main import ...
Read now
Unlock full access