I am facing issue in importing a gitsubmodule containing golang package with go.mod and go.sum file inside the package inside main project directory. But facing issue in importing the package.
go.mod inside gitsubmodule package
module abc
go 1.18
go.mod inside main project directory
module def
go 1.18
files inside the gitsubmodule go package has imports
package abc
import "abc/sample"
file for main project package
package main
import "def/abc/sample"
the structure of my project code is like this:-
|── go.sum
|── go.mod
|── main.go import "def/abc"
abc
├── constant
| ├── constant.go
├── abc.go ----> import "abc/constant"
|── go.mod
|── go.sum
and but import "abc/constant" giving problem for gitsubmodule saying import error when I try to run main.go file