utils

package
Version: v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgContestIDRequired = "Contest id is required. Try '--help' option for help."
	MsgTaskNameRequired  = "Task name is required. Try '--help' option for help."
	MsgSbmIDRequired     = "Submission id is required. Try '--help' option for help."
	MsgSbmSourceRequired = "Submission source is required. Try '--help' option for help."
)

Variables

This section is empty.

Functions

func Confirm added in v0.2.0

func Confirm(msg string) bool

func ContestDir added in v0.1.0

func ContestDir() (string, error)

func CreateDirsForTask

func CreateDirsForTask(task *models.Task) error

func CreateFilesForTask

func CreateFilesForTask(contest *models.Contest, task *models.Task) error

func CreateFilesForTasks

func CreateFilesForTasks(contest *models.Contest, tasks []*models.Task) error

func CreateSampleFiles

func CreateSampleFiles(task *models.Task) error

func CreateSourceFile

func CreateSourceFile(contest *models.Contest, task *models.Task) error

func DefaultRootDir added in v0.1.0

func DefaultRootDir() string

func DownloadTestcases added in v0.1.0

func DownloadTestcases(contest *models.Contest, tasks []*models.Task) error

func GetSampleNames added in v0.1.0

func GetSampleNames(taskName string, isForTestcases bool) ([]string, error)

func RootDir added in v0.1.0

func RootDir() string

func TaskDir added in v0.1.0

func TaskDir(taskName string) (string, error)

func TaskInputFilePath

func TaskInputFilePath(taskName string, sampleName string, isForTestcases bool) (string, error)

func TaskOutputFilePath

func TaskOutputFilePath(taskName string, sampleName string, isForTestcases bool) (string, error)

func TaskSampleDir added in v0.1.0

func TaskSampleDir(taskName string, isForTestcases bool) (string, error)

func TaskSampleInDir added in v0.1.0

func TaskSampleInDir(taskName string, isForTestcases bool) (string, error)

func TaskSampleOutDir added in v0.1.0

func TaskSampleOutDir(taskName string, isForTestcases bool) (string, error)

func TaskSourceFilePath

func TaskSourceFilePath(taskName string) (string, error)

Types

type TemplateData added in v0.1.0

type TemplateData struct {
	Contest *models.Contest
	Task    *models.Task
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL