code: func CheckKnownMajorVersion(version Version) error {
  	for _, knownVersion := range KnownVersions() {
  		if version.Major == knownVersion.Major {
  			return nil
  		}
  	}
  	return ErrBadVersion{version}
  }
docs: // CheckKnownMajorVersion returns nil if the given version has a known
  // major version. You probably want to use this with NewDecryptStream,
  // unless you want to restrict to specific versions only.