code: func ChannelHeader(env *cb.Envelope) (*cb.ChannelHeader, error) {
  	envPayload, err := UnmarshalPayload(env.Payload)
  	if err != nil {
  		return nil, err
  	}
  
  	if envPayload.Header == nil {
  		return nil, errors.New("header not set")
  	}
  
  	if envPayload.Header.ChannelHeader == nil {
  		return nil, errors.New("channel header not set")
  	}
  
  	chdr, err := UnmarshalChannelHeader(envPayload.Header.ChannelHeader)
  	if err != nil {
  		return nil, errors.WithMessage(err, "error unmarshaling channel header")
  	}
  
  	return chdr, nil
  }
docs: // ChannelHeader returns the *cb.ChannelHeader for a given *cb.Envelope.