{"modulePath":"github.com/UnityTech/client-go","version":"v2.0.0+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package recognizer\n\n## Functions\n\n```go\nfunc NewDecoder(decoders ...runtime.Decoder) runtime.Decoder\n```\nNewDecoder creates a decoder that will attempt multiple decoders in an order defined by:\n\n1\\. The decoder implements RecognizingDecoder and identifies the data 2. All other decoders, and any decoder that returned true for unknown.\n\nThe order passed to the constructor is preserved within those priorities.\n\n## Types\n\n```go\ntype RecognizingDecoder interface {\n\truntime.Decoder\n\t// RecognizesData should return true if the input provided in the provided reader\n\t// belongs to this decoder, or an error if the data could not be read or is ambiguous.\n\t// Unknown is true if the data could not be determined to match the decoder type.\n\t// Decoders should assume that they can read as much of peek as they need (as the caller\n\t// provides) and may return unknown if the data provided is not sufficient to make a\n\t// a determination. When peek returns EOF that may mean the end of the input or the\n\t// end of buffered input - recognizers should return the best guess at that time.\n\tRecognizesData(peek io.Reader) (ok, unknown bool, err error)\n}\n```\n\n","path":"github.com/UnityTech/client-go/pkg/runtime/serializer/recognizer","name":"recognizer","synopsis":"","isRedistributable":true}
