Documentation ¶
Index ¶
- func IsHexNumber(b byte) bool
- func IsLowerLetter(b byte) bool
- func IsNumber(b byte) bool
- func IsOctalNumber(b byte) bool
- func IsUpperLetter(b byte) bool
- func IsWhitespace(b byte) bool
- func MergeStrings(outStrings []string) string
- func ToLower(b byte) byte
- func ToUpper(b byte) byte
- type ByteView
- type SliceReader
- func (sr *SliceReader) AbsoluteOffset() int64
- func (sr *SliceReader) AbsoluteSize() int64
- func (sr *SliceReader) Cap(size int64) *SliceReader
- func (sr *SliceReader) ReadAt(buf []byte, index int64) (int, error)
- func (sr *SliceReader) Size() int64
- func (sr *SliceReader) Slice(offset int64) *SliceReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsWhitespace ¶
IsWhitespace tests if a byte is either a space or a tab
func MergeStrings ¶
MergeStrings concatenates a set of strings return by Identify into a string that file(1) would print. For example, it handles \b.
Types ¶
type ByteView ¶
type ByteView struct { Input *SliceReader LookBack int64 // contains filtered or unexported fields }
ByteView allows treating an io.ReaderAt as a byte array.
type SliceReader ¶
type SliceReader struct {
// contains filtered or unexported fields
}
func NewSliceReader ¶
func NewSliceReader(reader io.ReaderAt, offset int64, size int64) *SliceReader
func (*SliceReader) AbsoluteOffset ¶
func (sr *SliceReader) AbsoluteOffset() int64
func (*SliceReader) AbsoluteSize ¶
func (sr *SliceReader) AbsoluteSize() int64
func (*SliceReader) Cap ¶
func (sr *SliceReader) Cap(size int64) *SliceReader
func (*SliceReader) Size ¶
func (sr *SliceReader) Size() int64
func (*SliceReader) Slice ¶
func (sr *SliceReader) Slice(offset int64) *SliceReader
Click to show internal directories.
Click to hide internal directories.