Discover Packages
github.com/andrew-d/isbinary
package
module
Version:
v0.0.0-...-2da2e88
Opens a new window with list of versions in this module.
Published: Nov 28, 2019
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 6
Opens a new window with list of known importers.
README
README
¶
isbinary
This package exposes helper functions that allow checking whether some input is
binary or textual data. For more information, please see the GoDoc.
Expand ▾
Collapse ▴
Documentation
¶
BlockSize is the amount of data that will be considered when testing for
binary data.
Test will return whether or not the data contained in the first BlockSize
bytes of the input buffer is binary data. It will attempt to properly
handle UTF-8 encoded data - see the source for more information.
TestReader performs the same checks as Test, but will read the data to test
from the provided io.Reader.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.