mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user