My project structure is like this.
packagetest/
main.go
lib.go
In main.go, I have this code.
package m
I think the problem is you can only have one file using package main.
Try putting lib.go in a different package. This requires:
lib.go to exist in a folder with the same name as the new package (e.g., myLibs).
Adding the package name to lib.go (package myLibs).
Then, in main:
import myLibs
call myLibs.Test()