Re: Problem importing local go packages into the chaincode #fabric

Nye Liu <nye@...>

Golang does not allow relative imports.

On 3/4/2019 10:01 AM, Prasanth Sundaravelu wrote:
Hi guys,

I have a problem when I try to import a local go file into the main chaincode file.
This is my project structure:
- Main file: $GOPATH/src/proj/chaincode.go
- File that I want to import: $GOPATH/src/proj/util/util.go

util.go has been updated with package name: "util" and in chaincode.go,
- import "proj/util"
- import "src/proj/util"
-import "./util"

When I try to install this, I get this error:

"Error: could not assemble transaction, err proposal response was
not successful, error code 500, msg cannot get package for
chaincode (mycc:1.0)"

Any help really appreciated. Thanks.

Join to automatically receive all group messages.