func (p *PackageInput) Validate() error {
	if p.Path == "" {
		return errors.New("chaincode path must be specified")
	}
	if p.Type == "" {
		return errors.New("chaincode language must be specified")
	}
	if p.OutputFile == "" {
		return errors.New("output file must be specified")
	}
	if p.Label == "" {
		return errors.New("package label must be specified")
	}
	if err := persistence.ValidateLabel(p.Label); err != nil {
		return err
	}
	return nil
}
Validate checks for the required inputs
package packager
import (
	"archive/tar"
	"bytes"
	"compress/gzip"
	"encoding/json"
	"path/filepath"
	"strings"
	"github.com/hyperledger/fabric/core/chaincode/persistence"
	"github.com/pkg/errors"
	"github.com/hyperledger-labs/fabric-smart-client/integration/nwo/fabric/packager/replacer"
)
type Writer interface {
	WriteFile(string, string, []byte) error
}
type PackageInput struct {
	OutputFile string
	Path       string
	Type       string
	Label      string
}