utils

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallGenerator

func CallGenerator(ctx context.Context, tc *structs.TestCase, configDir string) ([]byte, error)

func Contains

func Contains(array interface{}, obj interface{}) bool

func GetCompiledBinaryFileAbsPath

func GetCompiledBinaryFileAbsPath(typeName, moduleName, configDir string) (string, error)

根据配置文件将对应预编译文件转换成绝对路径

func GetCompiledBinaryFileName

func GetCompiledBinaryFileName(typeName, moduleName string) string

func GetSessionDir

func GetSessionDir(workDir string, sessionId string) (string, error)

create and get session directory

func IsExecutableFile

func IsExecutableFile(filePath string) (bool, error)

func JSONBytesObject

func JSONBytesObject(jsonBytes []byte, obj interface{}) bool

func JSONStringObject

func JSONStringObject(jsonStr string, obj interface{}) bool

func ObjectToJSONByte

func ObjectToJSONByte(obj interface{}) []byte

func ObjectToJSONString

func ObjectToJSONString(obj interface{}) string

func ObjectToJSONStringFormatted

func ObjectToJSONStringFormatted(conf interface{}) string

func ParseGeneratorScript

func ParseGeneratorScript(script string) (string, []string, error)

解析generator脚本

func ParseTestlibCheckerOutput

func ParseTestlibCheckerOutput(report string)

func RunUnixShell

func RunUnixShell(options *structs.ShellOptions) (*structs.ShellResult, error)

运行UnixShell,支持context

func XMLBytesObject

func XMLBytesObject(xmlStr []byte, obj interface{}) bool

func XMLStringObject

func XMLStringObject(xmlStr string, obj interface{}) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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