I have set $GOPATH, and importing some part of my source code which is present in $GOPATH/src.
Package I need to import is written by me and stored in GOPATH/src I have named it as otelkafkago and it's path is GOPATH/src/otelkafkago
I have one more code base elsewhere on my HardDisk and when I try to compile that, it gives me
main.go:51:2: package otelkafkago is not in GOROOT (/usr/local/go/src/otelkafkago)
I have imported it as
import(
"otelkafkago"
)
Following is my screen capture during build,
kshitijpatil@PNQ-KPATIL checkoutservice % echo $GOPATH
/Users/kshitijpatil/go/
kshitijpatil@PNQ-KPATIL checkoutservice % go build
main.go:51:2: package otelkafkago is not in GOROOT (/usr/local/go/src/otelkafkago)
kshitijpatil@PNQ-KPATIL checkoutservice % env GOPATH=/Users/kshitijpatil/go go build
main.go:51:2: package otelkafkago is not in GOROOT (/usr/local/go/src/otelkafkago)
kshitijpatil@PNQ-KPATIL checkoutservice %