func (pm PackageManifest) GetChannel(channel string) (*PackageChannel, error) {
	if channel == DefaultChannel {
		defaultChannel := pm.GetDefaultChannel()
		if defaultChannel == "" {
			return nil, ErrNoDefaultChannel{pm.GetName()}
		}
		channel = defaultChannel
	}
	var packageChannel *operatorsv1.PackageChannel
	for _, ch := range pm.Status.Channels {
		ch := ch
		if ch.Name == channel {
			packageChannel = &ch
			break
		}
	}
	if packageChannel == nil {
		return nil, ErrChannelNotFound{ChannelName: channel, PackageName: pm.GetName()}
	}
	return &PackageChannel{PackageChannel: *packageChannel}, nil
}
GetChannel returns the specified package channel. DefaultChannel can be used to fetch the package's default channel.
package operator
import (
	"fmt"
	operatorsv1 "github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1"
	"k8s.io/apimachinery/pkg/util/sets"
)
type PackageManifest struct {
	operatorsv1.PackageManifest
}
const DefaultChannel = ""