func ParseUnknownFile(fileName string) (ObjectSet, error) {
	fd, err := os.Open(fileName)
	if err != nil {
		return nil, err
	}
	defer fd.Close()
	return ParseUnknown(fd)
}
ParseUnknownFile attempts to parse a file whose content we don't know.  We
try to use the right parser by looking at the file's annotation.  An
ObjectSet is returned if parsing was successful.
package zoossh
import (
	"fmt"
	"io"
	"net"
	"os"
)
type Fingerprint string
type Object interface {
	String() string
	GetFingerprint() Fingerprint
}
type ObjectSet interface {
	Length() int
	Iterate(*ObjectFilter) <-chan Object
	GetObject(Fingerprint) (Object, bool)
	Merge(ObjectSet)
}
type ObjectFilter struct {
	Fingerprints map[Fingerprint]struct{}
	IPAddrs      map[string]struct{}
	Nicknames    map[string]struct{}
}
func (filter *ObjectFilter) HasFingerprint(fpr Fingerprint) bool {
	_, exists := filter.Fingerprints[fpr]
	return exists
}
func (filter *ObjectFilter) HasIPAddr(addr net.IP) bool {
	_, exists := filter.IPAddrs[addr.String()]
	return exists
}
func (filter *ObjectFilter) HasNickname(nickname string) bool {
	_, exists := filter.Nicknames[nickname]
	return exists
}
func (filter *ObjectFilter) AddFingerprint(fpr Fingerprint) {
	filter.Fingerprints[fpr] = struct{}{}
}
func (filter *ObjectFilter) AddIPAddr(addr net.IP) {
	filter.IPAddrs[addr.String()] = struct{}{}
}
func (filter *ObjectFilter) AddNickname(nickname string) {
	filter.Nicknames[nickname] = struct{}{}
}
func (filter *ObjectFilter) IsEmpty() bool {
	return len(filter.Fingerprints) == 0 &&
		len(filter.IPAddrs) == 0 &&
		len(filter.Nicknames) == 0
}
func NewObjectFilter() *ObjectFilter {
	return &ObjectFilter{
		make(map[Fingerprint]struct{}),
		make(map[string]struct{}),
		make(map[string]struct{}),
	}
}
func parseWithAnnotation(r io.Reader, annotation *Annotation) (ObjectSet, error) {
	if _, ok := descriptorAnnotations[*annotation]; ok {
		return parseDescriptorUnchecked(r, false)
	}
	if _, ok := consensusAnnotations[*annotation]; ok {
		return parseConsensusUnchecked(r, false, true)
	}
	if _, ok := bridgeNetworkStatusAnnotations[*annotation]; ok {
		return parseConsensusUnchecked(r, false, false)
	}
	return nil, fmt.Errorf("could not find suitable parser")
}
func ParseUnknown(r io.Reader) (ObjectSet, error) {
	annotation, r, err := readAnnotation(r)
	if err != nil {
		return nil, err
	}
	return parseWithAnnotation(r, annotation)
}