My project structure is like this.
packagetest/ main.go lib.go
In main.go, I have this code.
main.go
package m
Run all the file then able to call
go run *.go
or
go run main.go lib.go