func NewCCPackage(chaincodePath string, goPath string) (*fab.CCPackage, error) {
	if chaincodePath == "" {
		return nil, errors.New("chaincode path must be provided")
	}
	var projDir string
	gp := goPath
	if gp == "" {
		gp = defaultGoPath()
		if gp == "" {
			return nil, errors.New("GOPATH not defined")
		}
		logger.Debugf("Default GOPATH=%s", gp)
	}
	projDir = path.Join(gp, "src", chaincodePath)
	logger.Debugf("projDir variable=%s", projDir)
	descriptors, err := findSource(gp, projDir)
	if err != nil {
		return nil, err
	}
	tarBytes, err := generateTarGz(descriptors)
	if err != nil {
		return nil, err
	}
	ccPkg := &fab.CCPackage{Type: pb.ChaincodeSpec_GOLANG, Code: tarBytes}
	return ccPkg, nil
}
NewCCPackage creates new go lang chaincode package
package gopackager
import (
	"archive/tar"
	"bytes"
	"compress/gzip"
	"go/build"
	"io"
	"os"
	"path"
	"path/filepath"
	"time"
	"github.com/hyperledger/fabric-sdk-go/pkg/logging"
	"github.com/pkg/errors"
	fab "github.com/hyperledger/fabric-sdk-go/api/apifabclient"
	pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer"
)
type Descriptor struct {
	name string
	fqp  string
}
var keep = []string{".go", ".c", ".h"}
var logger = logging.NewLogger("fabric_sdk_go")