utils

package
v0.0.0-...-6573a97 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFiles

func CopyFiles(src, dest string) (err error)

func DownloadFile

func DownloadFile(filename, url, method, body string) (statusCode uint16, err error)

func ExecCommand

func ExecCommand(command string, arg ...string) (result []byte, err error)

func ExecCommandString

func ExecCommandString(command string) (result string, err error)

func ExtractGzip

func ExtractGzip(gzipFile, destDir string) (err error)

func ReadJsonFile

func ReadJsonFile(filename string, content interface{}) (ok bool)

func ReadTextFile

func ReadTextFile(filename string) (content string, ok bool)

func RequestJson

func RequestJson(url, method string, params []interface{}, reply interface{}) (statusCode uint16, err error)

func RequestText

func RequestText(url, method, body string) (result string, statusCode uint16, err error)

func Unzip

func Unzip(zipFile, destDir string) (err error)

func WriteJsonFile

func WriteJsonFile(filename string, v interface{}) (err error)

func WriteTextFile

func WriteTextFile(filename string, content string) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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