func readToNextPublicKey(packets *packet.Reader) (err error) {
	var p packet.Packet
	for {
		p, err = packets.Next()
		if err == io.EOF {
			return
		} else if err != nil {
			if _, ok := err.(errors.UnsupportedError); ok {
				err = nil
				continue
			}
			return
		}

		if pk, ok := p.(*packet.PublicKey); ok && !pk.IsSubkey {
			packets.Unread(p)
			return
		}
	}
}
// readToNextPublicKey reads packets until the start of the entity and leaves
// the first packet of the new entity in the Reader.
readToNextPublicKey reads packets until the start of the entity and leaves
the first packet of the new entity in the Reader.
// readToNextPublicKey reads packets until the start of the entity and leaves // the first packet of the new entity in the Reader .
func readToNextPublicKey(packets *packet.Reader) (err error) {
	var p packet.Packet
	for {
		p, err = packets.Next()
		if err == io.EOF {
			return
		} else if err != nil {
			if _, ok := err.(errors.UnsupportedError); ok {
				err = nil
				continue
			}
			return
		}
		if pk, ok := p.(*packet.PublicKey); ok && !pk.IsSubkey {
			packets.Unread(p)
			return
		}
	}
}
func readToNextPublicKey ( packets * packet . Reader ) ( err error ) { var p packet . Packet for { p , err = packets . Next ( ) if err == io . EOF { return } else if err != nil { if _ , ok := err . ( errors . UnsupportedError ) ; ok { err = nil continue } return } if pk , ok := p . ( * packet . PublicKey ) ; ok && ! pk . IsSubkey { packets . Unread ( p ) return } } }
readToNextPublicKey reads packets until the start of the entity and leaves
the first packet of the new entity in the Reader.
readToNextPublicKey reads packets until the start of the entity and leaves the first packet of the new entity in the Reader .