creating a local/offline copy of the tour (via go install golang.org/x/website/tour@latest) works, but the local content does not contain anything on generics, and trying to run code that uses generics in the code runner gives an error. this is the console output from a run, showing the content is from 2021 (generics were released in 2022):
C:\Users\USER>tour
2022/10/30 09:20:08 Serving content from C:\Users\USER\go\pkg\mod\golang.org\x\website\tour@v0.0.0-20210616181959-e0d934b43647
2022/10/30 09:20:09 A browser window should open. If not, please visit http://127.0.0.1:3999
2022/10/30 09:20:10 accepting connection from: 127.0.0.1:58947
2022/10/30 09:20:26 accepting connection from: 127.0.0.1:58976
this is from the online tour:
this is from the local copy:
since go.mod is set to Go 1.16, the included code runner doesn't support generics:
creating a local/offline copy of the tour (via
go install golang.org/x/website/tour@latest
) works, but the local content does not contain anything on generics, and trying to run code that uses generics in the code runner gives an error. this is the console output from a run, showing the content is from 2021 (generics were released in 2022):this is from the online tour:
this is from the local copy:
since
go.mod
is set to Go 1.16, the included code runner doesn't support generics: