preprocess

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dos2Unix

func Dos2Unix(b []byte) []byte

Dos2Unix converts given DOS-line endings to UNIX-line endings

func IsTextFile

func IsTextFile(path string) (bool, error)

IsTextFile is a best effort to determine if a file is a script file (with a known file extension) or a file that starts with a shebang (!#)

func RemoveBOM

func RemoveBOM(b []byte) []byte

RemoveBOM trims the BOM prefix from provided the data and converts the text to UTF-8 if it was encoded as UTF-16 with BOM.

Types

This section is empty.

Jump to

Keyboard shortcuts

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