utils

package
v0.0.0-...-670fffb Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertMemoryInMb

func ConvertMemoryInMb(memory uint64) uint64

func CreateDir

func CreateDir(folderPath string) error

func CreateFile

func CreateFile(folderPath string, filename string) error

func FilterHtml

func FilterHtml(src []byte) []byte

func GetContestType

func GetContestType(contestId string) string

func GetContestUrl

func GetContestUrl(cfg config.Configuration) string

func GetFilenamesInDir

func GetFilenamesInDir(folderPath string) []string

func GetProblemInfo

func GetProblemInfo(cfg config.Configuration, problemId string) (dto.Problem, error)

func GetProblemUrl

func GetProblemUrl(cfg config.Configuration, problemId string) string

func GetSourceDirPath

func GetSourceDirPath(cfg config.Configuration) string

func GetSourceFilePathWithExt

func GetSourceFilePathWithExt(cfg config.Configuration, problemId string) string

func GetSourceFilePathWithoutExt

func GetSourceFilePathWithoutExt(cfg config.Configuration, problemId string) string

func GetTestcaseDirPath

func GetTestcaseDirPath(cfg config.Configuration) string

func GetTestcaseFilePath

func GetTestcaseFilePath(cfg config.Configuration, problemId string) string

func IsDigit

func IsDigit(r rune) bool

func IsDirExist

func IsDirExist(folderPath string) bool

func IsFileExist

func IsFileExist(filePath string) bool

func OpenFile

func OpenFile(filePath string) error

func ParseCommand

func ParseCommand(s string) (res []string)

ParseCommand parses a command line and handle arguments in quotes. https://github.com/vrischmann/shlex/blob/master/shlex.go

func ParseContestAndProblemId

func ParseContestAndProblemId(cmd string) (string, string, error)

func ParseMemoryInKb

func ParseMemoryInKb(memory uint64) string

func ParseMemoryInMb

func ParseMemoryInMb(memory uint64) string

func ResolveTescasePath

func ResolveTescasePath(cfg config.Configuration, problemId string) error

func TrimIO

func TrimIO(io string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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