From a21e8bf7e405a5c9746d423b5cbf6a6e767630f2 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Thu, 10 Oct 2019 08:43:48 +0200 Subject: [PATCH] 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 --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1118af83..c66147c3 100644 --- a/README.md +++ b/README.md @@ -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