Documentation
¶
Index ¶
- Variables
- func AppendToContent(filename string, data string) (string, error)
- func BadBlockF(format string, args ...interface{})
- func BannerF(format string, data string)
- func Base64Encode(raw string) string
- func BlockF(name string, data string)
- func CalcTimeout(raw string) int
- func Cat(filename string)
- func CleanPath(raw string) string
- func Copy(src string, dest string)
- func CountLines(filename string) int
- func Debug(args ...interface{})
- func DebugF(format string, args ...interface{})
- func DirLength(dir string) int
- func Emojif(e string, format string, args ...interface{}) string
- func EmptyDir(dir string) bool
- func EmptyFile(filename string, num int) bool
- func Error(args ...interface{})
- func ErrorF(format string, args ...interface{})
- func FileExists(filename string) bool
- func FileLength(filename string) int
- func FolderExists(foldername string) bool
- func FolderLength(dir string) int
- func GenHash(text string) string
- func GetCurrentDay() string
- func GetDomain(raw string) (string, error)
- func GetFileContent(filename string) string
- func GetFileSize(src string) float64
- func GetOSEnv(name string, defaultValue string) string
- func GetTS() string
- func GoodF(format string, args ...interface{})
- func ImageAsBase64(src string) string
- func Infor(args ...interface{})
- func InforF(format string, args ...interface{})
- func InitHTTPClient()
- func InitLog(options *libs.Options)
- func IsFile(src string) bool
- func IsWritable(filename string) (isWritable bool, err error)
- func MakeDir(folder string)
- func Move(src string, dest string) error
- func NormalizePath(path string) string
- func PrefixF(symbol string, format string, args ...interface{})
- func PrintLine()
- func RandomString(n int) string
- func ReadingFileUnique(filename string) []string
- func ReadingLines(filename string) []string
- func RenderText(format string, data map[string]string) string
- func RunCmdWithOutput(command string, timeoutRaw ...string) string
- func RunCommandSteamOutput(cmd string) (string, error)
- func RunCommandWithErr(command string, timeoutRaw ...string) (string, error)
- func RunCommandWithoutOutput(cmd string) error
- func RunOSCommand(cmd string) (string, error)
- func RunOSCommandStream(cmd, std string) error
- func StrToInt(data string) int
- func StripPath(raw string) string
- func TSPrintF(format string, args ...interface{})
- func Trace(args ...interface{})
- func TraceF(format string, args ...interface{})
- func Warn(args ...interface{})
- func WarnF(format string, args ...interface{})
- func WriteToFile(filename string, data string) (string, error)
- func ZippedFolder(src string, dest string) error
- type OffsetRange
- type RangeReader
- type Response
Constants ¶
This section is empty.
Variables ¶
var DefaultClient *http.Client
var (
UA string
)
Functions ¶
func AppendToContent ¶
AppendToContent append string to a file
func CountLines ¶
CountLines Return the lines amount of the file
func FolderExists ¶
FolderExists check if file is exist or not
func FolderLength ¶
func GetFileContent ¶
GetFileContent Reading file and return content of it
func ImageAsBase64 ¶
ImageAsBase64 read image file as a string
func InitHTTPClient ¶
func InitHTTPClient()
func IsWritable ¶
func ReadingFileUnique ¶
ReadingFileUnique Reading file and return content as []string
func ReadingLines ¶
ReadingLines Reading file and return content as []string
func RenderText ¶
RenderText resolve template from signature file
func RunCmdWithOutput ¶
RunCmdWithOutput run command with timeout
func RunCommandSteamOutput ¶
func RunCommandWithErr ¶
RunCommandWithErr Run a command
func RunCommandWithoutOutput ¶
RunCommandWithoutOutput Run a command
func RunOSCommand ¶
func RunOSCommandStream ¶
func WriteToFile ¶
WriteToFile write string to a file
Types ¶
type OffsetRange ¶
OffsetRange represents a content block of a file.
func SplitLineChunks ¶
func SplitLineChunks(filename string, chunks int) ([]OffsetRange, error)
SplitLineChunks splits file into chunks. The whole line are guaranteed to be split in the same chunk.
type RangeReader ¶
type RangeReader struct {
// contains filtered or unexported fields
}
A RangeReader is used to read a range of content from a file.
func NewRangeReader ¶
func NewRangeReader(file *os.File, start, stop int64) *RangeReader
NewRangeReader returns a RangeReader, which will read the range of content from file.