README.md: initialize a module before running module commands

Go 1.14 disables the use of `go run` in module mode outside a module,
see https://golang.org/issue/32027.

Suggest initializing a module in the current directory instead; that
enables module mode (in Go 1.13) and enables `go run`.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-10-10 08:43:48 +02:00
parent e4b1a46dd2
commit a21e8bf7e4
+4 -3
View File
@@ -24,9 +24,10 @@ window management, input and GPU drawing.
## Running Gio programs
With [Go 1.13](https://golang.org/dl/) or newer,
With [Go 1.13](https://golang.org/dl/) or newer, initialize a new module and run
the "hello" example:
$ export GO111MODULE=on
$ go mod init example.com
$ go run gioui.org/example/hello
should display a simple message in a window.
@@ -35,7 +36,7 @@ The command
$ go run gioui.org/example/gophers
runs a simple (nonsense) demo that displays Go contributors fetched from GitHub.
runs another example that displays Go contributors fetched from GitHub.
## Running on mobiles