Documentation
¶
Index ¶
- func ConvertExcelToCSV(filePath string) error
- func ConvertExcelToTSV(filePath string) error
- func ConvertStringToCharByte(s string) []byte
- func ConvertStringToCharRune(s string) rune
- func CopyByReader(src io.Reader, dst io.Writer, buffer ...[]byte) error
- func CopyFile(src, dst string) error
- func HasNullByteInFile(filePath string) (bool, error)
- func HasNullByteInReader(r io.Reader) (bool, error)
- func IsCIDR(i string) bool
- func IsDarwin() bool
- func IsDomain(i any) bool
- func IsIP(i string) bool
- func IsIPv4(i string) bool
- func IsIPv4CIDR(i string) bool
- func IsIPv6(i string) bool
- func IsIPv6CIDR(i string) bool
- func IsPathExist(f string) bool
- func IsURL(u string) bool
- func IsWindows() bool
- func ListFiles(dir, contentType string, fileExteinsion ...string) []string
- func RemoveNullByte(data []byte) []byte
- func RemoveNullByteInFile(filePath string) error
- func RemoveNullByteInReader(reader io.Reader) (io.Reader, error)
- func ReplaceDelimiter(filePath string, old, new string) error
- func ReplaceDosToUnix(filePath string) error
- func SkipFirstRow(f *os.File) error
- func ToInt64(v any) (int64, error)
- func UnZip(zip, dst string) error
- func Version() string
- func Zip(src, zip string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertExcelToCSV ¶
ConvertExcelToCSV converts the Excel file to the CSV format file.
func ConvertExcelToTSV ¶
ConvertExcelToTSV converts the Excel file to the TSV format file.
func ConvertStringToCharByte ¶ added in v0.0.2
ConvertStringToCharByte converts the given string(char) to a byte slice.
func ConvertStringToCharRune ¶ added in v0.0.2
ConvertStringToCharRune converts the given string(char) to a rune.
func CopyByReader ¶
CopyByReader copies the src Reader to the dst Writer.
func HasNullByteInFile ¶ added in v0.0.2
HasNullByteInFile checks the file has the ASCII 0 or not.
func HasNullByteInReader ¶ added in v0.0.2
HasNullByteInReader checks the reader has the ASCII 0 or not.
func IsIPv4CIDR ¶ added in v0.0.2
IsIPv4CIDR checks if i is a valid IPv4 CIDR.
func IsIPv6CIDR ¶ added in v0.0.2
IsIPv6CIDR checks if i is a valid IPv6 CIDR.
func IsPathExist ¶ added in v0.0.2
IsPathExist checks if f is a valid path.
func ListFiles ¶
ListFiles returns a slice containing file paths for a given content type and file extension.
func RemoveNullByte ¶
RemoveNullByte removes the ASCII 0 in the data.
func RemoveNullByteInFile ¶ added in v0.0.2
RemoveNullByteInFile removes the ASCII 0 in the file.
func RemoveNullByteInReader ¶ added in v0.0.2
RemoveNullByteInReader removes the ASCII 0 in reader.
func ReplaceDelimiter ¶
ReplaceDelimiter replaces the old delimiter with the new delimiter in the filePath.
func ReplaceDosToUnix ¶
ReplaceDosToUnix replaces the Windows end of line(eol) with the Unix eol in the filePath.
func ToInt64 ¶ added in v0.0.2
ToInt64 converts v to int64 value, if input is not numerical, return 0 and error.
Types ¶
This section is empty.