rest

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsJSONStream

func IsJSONStream(r io.Reader, size int) (io.Reader, bool)

IsJSONStream scans the provided reader up to size, looking for a json prefix indicating this is JSON. It will return the bufio.Reader it creates for the consumer. The buffer size will at either be the size of 'size' or the size of the Reader passed in 'r', whichever is larger. Inspired from https://github.com/kubernetes/apimachinery/blob/v0.21.0/pkg/util/yaml/decoder.go

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL