Documentation ¶
Index ¶
- func CallGenerator(ctx context.Context, tc *structs.TestCase, configDir string) ([]byte, error)
- func Contains(array interface{}, obj interface{}) bool
- func GetCompiledBinaryFileAbsPath(typeName, moduleName, configDir string) (string, error)
- func GetCompiledBinaryFileName(typeName, moduleName string) string
- func GetSessionDir(workDir string, SessionID string) (string, error)
- func IsExecutableFile(filePath string) (bool, error)
- func IsProblemPackage(filePath string) (bool, error)
- func IsZipFile(filePath string) (bool, error)
- func JSONBytesObject(jsonBytes []byte, obj interface{}) bool
- func JSONStringObject(jsonStr string, obj interface{}) bool
- func ObjectToJSONByte(obj interface{}) []byte
- func ObjectToJSONString(obj interface{}) string
- func ObjectToJSONStringFormatted(conf interface{}) string
- func ParseGeneratorScript(script string) (string, []string, error)
- func RunUnixShell(options *structs.ShellOptions) (*structs.ShellResult, error)
- func XMLBytesObject(xmlStr []byte, obj interface{}) bool
- func XMLStringObject(xmlStr string, obj interface{}) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallGenerator ¶
CallGenerator 调用Generator
func GetCompiledBinaryFileAbsPath ¶
GetCompiledBinaryFileAbsPath 根据配置文件将对应预编译文件转换成绝对路径
func GetCompiledBinaryFileName ¶
GetCompiledBinaryFileName 获取testlib的二进制程序前缀名
func GetSessionDir ¶
GetSessionDir get or create a session directory
func IsExecutableFile ¶
IsExecutableFile 判断是否是可执行程序(支持linux和macos)
func IsProblemPackage ¶
IsProblemPackage 判断是否是题目包
func JSONBytesObject ¶
JSONBytesObject 解析JSON字节数组
func JSONStringObject ¶
JSONStringObject 解析JSON字符串
func ObjectToJSONByte ¶
func ObjectToJSONByte(obj interface{}) []byte
ObjectToJSONByte 将对象转换成JSON字节数组
func ObjectToJSONString ¶
func ObjectToJSONString(obj interface{}) string
ObjectToJSONString 将对象转换成JSON字符串
func ObjectToJSONStringFormatted ¶
func ObjectToJSONStringFormatted(conf interface{}) string
ObjectToJSONStringFormatted 将对象转换成JSON字符串并格式化
func ParseGeneratorScript ¶
ParseGeneratorScript 解析generator脚本
func RunUnixShell ¶
func RunUnixShell(options *structs.ShellOptions) (*structs.ShellResult, error)
RunUnixShell 运行UnixShell,支持context
func XMLBytesObject ¶
XMLBytesObject 解析XML字节数组
func XMLStringObject ¶
XMLStringObject 解析XML字符串
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.