I want to push out some of API, from main package into separate package:
myapp/
main.go
myapi/
myapi.go
Inside main.go
i have
package main
import "./myapi"
...
And myapi.go
just starts with:
package myapi
...
When I am trying to run main, it seems like it can't find my myapi
#include
. It gives me following error:
D:\go\myapp> go run .
build _/D_/go/myapp/myapi: cannot find module for path _/D_/go/myapp/myapi
I came from C/C++ world, and it's extremely unobvious, how to include from subfolder in golang. Could you help me with this?