README ¶ bom small tools for cleaning bom from byte array or reader Installation $ go get github.com/ssor/bom How to Use bs := []byte{bom0, bom1, bom2, 0x11} result := CleanBom(bs) bs := []byte{bom0, bom1, bom2, 0x11} result := NewReaderWithoutBom(bytes.NewReader(bs)) Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func CleanBom(b []byte) []byte func NewReaderWithoutBom(r io.Reader) (io.Reader, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func CleanBom ¶ func CleanBom(b []byte) []byte CleanBom returns b with the 3 byte BOM stripped off the front if it is present. If the BOM is not present, then b is returned. func NewReaderWithoutBom ¶ func NewReaderWithoutBom(r io.Reader) (io.Reader, error) NewReaderWithoutBom returns an io.Reader that will skip over initial UTF-8 byte order marks. Types ¶ This section is empty. Source Files ¶ View all Source files bom.go Click to show internal directories. Click to hide internal directories.