utils

package
v0.0.0-...-d44e891 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiMessage

func ApiMessage(code uint32, message string, description interface{}, path string) map[string]interface{}

func ApiResponse

func ApiResponse(w http.ResponseWriter, data map[string]interface{})

func ApiResponseByteArray

func ApiResponseByteArray(w http.ResponseWriter, data []byte)

func ApiResponseZip

func ApiResponseZip(w http.ResponseWriter, data []byte)

func AppendFile

func AppendFile(fileName string, content string)

func CreateDir

func CreateDir(dirName string)

func CreateFileIfNotExist

func CreateFileIfNotExist(fileName string)

func DoesFileExists

func DoesFileExists(filename string) bool

func GetCommandDetailsForEndedCommand

func GetCommandDetailsForEndedCommand(endedCommand *exec.Cmd) *models.CommandDetails

* ! The command must have already ended

func GetMessage

func GetMessage() map[uint32]string

func ReadFile

func ReadFile(fileName string) string

func RunCommand

func RunCommand(command string) *models.CommandDetails

func StartCommand

func StartCommand(command string) *exec.Cmd

func StartCommandAndGetError

func StartCommandAndGetError(command []string) error

func StartCommands

func StartCommands(commands []string) []*exec.Cmd

func TrimSpacesAndLineEndings

func TrimSpacesAndLineEndings(data []string) []string

func WriteFile

func WriteFile(fileName string, content []byte)

func WriteFileJson

func WriteFileJson(fileName string, content interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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