#[solved ]Sharing stuff between packages
3 messages · Page 1 of 1 (latest)
3 messages · Page 1 of 1 (latest)
So i have a main.go and a folder called other with a mod.go how do I share functions and stuff between these?
// main.go
package main
import (
"fmt"
_ "barrybtw.com/package-test/other"
)
func main() {
fmt.Println("Hello, playground")
mainother()
}
// other/mod.go
package other
import (
"fmt"
)
func mainother() {
fmt.Println("Hello, playground")
}
This doesn't work and I'm not sure why