Documentation
¶
Index ¶
- func AllSameNumbers(n []int) bool
- func AllSameStrings(a []string) bool
- func BaseURL(url string) string
- func CombineFiles(files []string, filename string) error
- func Command(timeout int, command string, args ...string) string
- func CopyFile(sourcePath, destinationPath string) error
- func CopyMap[K, V comparable](m map[K]V) map[K]V
- func CountLines(r io.Reader) (int, error)
- func DecodeJSON(in []byte) (any, error)
- func DeleteFile(filepath string) error
- func Difference(a, b []string) []string
- func DownloadFile(filepath string, url string, headers map[string]string) (written int64, err error)
- func EpochTime() int64
- func EpochTimeStr() string
- func EpochToZulu(epoch int64) string
- func Equals(exp, act interface{}) bool
- func FileExists(filename string) bool
- func FindMatch(filePath, pattern string) ([]string, error)
- func HasString(ss []string, str string) bool
- func HasStrings(str string, ss ...string) (bool, int)
- func HashFile(filePath string) (string, error)
- func IndexOf(element string, data []string) int
- func JoinURL(base string, paths ...string) string
- func LastString(ss []string) string
- func MakeTempFile(tempFileDir, prefix string) (f string, err error)
- func MinMax(array []int) (int, int)
- func ParseURL(someURL string) string
- func RandomString(length int) string
- func ReadFileToBytes(filePath string) ([]byte, error)
- func ReadFileToString(filePath string) (string, error)
- func SSH(ipAddress, command string) (string, error)
- func SendRequest(method RequestMethod, url, body string, headers map[string]string) (int, []byte, error)
- func TempDir() string
- func TimeStamp() string
- func TrimString(s string) (string, error)
- func UniqueFloats(floatSlice []float64) []float64
- func UniqueInts(intSlice []int) []int
- func WalkMatch(root, pattern string) ([]string, error)
- type RequestMethod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllSameNumbers ¶
func AllSameStrings ¶
func CombineFiles ¶
func CopyMap ¶
func CopyMap[K, V comparable](m map[K]V) map[K]V
func DecodeJSON ¶
func DeleteFile ¶
func Difference ¶
func DownloadFile ¶
func DownloadFile(filepath string, url string, headers map[string]string) (written int64, err error)
DownloadFile returns the number of bytes written.
func EpochTimeStr ¶
func EpochTimeStr() string
func EpochToZulu ¶
func FileExists ¶
func LastString ¶
func MakeTempFile ¶
func RandomString ¶
func ReadFileToBytes ¶
func ReadFileToString ¶
func SendRequest ¶
func TrimString ¶
func UniqueFloats ¶
func UniqueInts ¶
Types ¶
type RequestMethod ¶
type RequestMethod byte
const ( HEAD RequestMethod = iota GET POST PUT DELETE )
func (RequestMethod) String ¶
func (method RequestMethod) String() string
Click to show internal directories.
Click to hide internal directories.