OK, Go's major selling point is its ease of compilation and wonderful toolchain, but as a go newbie I'm really lost there and can't understand the documentation on that point.
I have a stack toy example within two files (one for the type definition and methods, called stack.go, one for the main program, called main.go), both are in my GOPATH/src/stacker directory.
- How should each file be named ? Does it have any importance at all ? Is there at least a convention ? A mandatory naming ?
- What should be the package name ? I understood they should use the same package name, but which one ? Is it
stacker? - In
main.go, how should I use theimportdirective to importstack.go?
I have tried many combinations, none working until now.