I have a temporary directory, lets call them "~/tmp/sandbox/go/src", to
test Go behaviour here and there that sometimes I always forget.

This time I want to know how the interface{} type works.  I create
directory "interface" then inside it I create "main.go" file.

When running it with "go run ." it display an error,

  go: cannot find main module, but found .git/config in /home/ms
        to create a module there, run:
        cd ../../../../.. && go mod init

I know how to solve this, either turn off GO111MODULE or set GOPATH.

Now imagine the scenario when you want to teach Go programming to
new learner, let say students.  After you introduce them to Go syntax,
and ready for practice you inform them that, the first thing to do
to create a Go program are,

  -  Create directory
  -  Create module using "go mod init"
  -  and so on.

Well, if I am the student, I will ask `What is "go mod"`?, and then
instead of practicing programming, we take time to learn the ecosystem
of Go.

Is this the goal of Go?  What do you think?

-- 
{ "github":"github.com/shuLhan", "site":"kilabit.info" }

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to