zserge / lorca

Build cross-platform modern desktop apps in Go + HTML5
MIT License
8.04k stars 535 forks source link

Running main readme example, gives: ./main.go:68:36: undefined: FS #135

Closed rw3iss closed 3 years ago

rw3iss commented 3 years ago

I'm on Ubuntu 20.10: Linux G14 5.10.4-051004-generic #202012301142 SMP Wed Dec 30 11:44:55 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

> (base) rw3iss@G14:~/Sites/go/lorca$ cd examples/counter
> (base) rw3iss@G14:~/Sites/go/lorca/examples/counter$ go get
> go: downloading golang.org/x/net v0.0.0-20200222125558-5a598a2470a0
> (base) rw3iss@G14:~/Sites/go/lorca/examples/counter$ go run main.go
> # command-line-arguments
> ./main.go:68:36: undefined: FS

Any ideas?

sandro commented 3 years ago

try go run . in the examples/counter directory.

rw3iss commented 3 years ago

Ah, worked! Many thanks!!

timcolson commented 3 years ago

Thx @sandro. I got here because of same error. I was just following the Readme directions with go 1.16 on RasPi -- I'm curious why those instructions are wrong? Thx!

sandro commented 3 years ago

@timcolson I think the instructions were written for an older version of Go which allowed running a single file that declared a main function with other main functions in the same directory.

timcolson commented 3 years ago

Thx again @sandro. Based on history, Readme instructions were added in Jan 2020 when go v1.13 was current, not v1.16 today.

Looks like #130 pull request would have fixed the Readme back in Nov 2020.

@zserge -- I appreciate the work on the library; please consider this small tweak to the Readme to help others get started.