template

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version string
	Order   = []string{
		"_root",
		"Makefile",
		"config",
		"gen",
		"std",
		"_problem",
		"description",
		"input",
		"output",
		"hint",
		"_data",
		"sample-in",
		"sample-out",
	}
)

Functions

func Create

func Create(path string) error

func Generate

func Generate(f *os.File, path string) error

func GenerateTests

func GenerateTests(t Template, overwrite bool, size, timeLimit, memoryLimit int) error

func GetData

func GetData(t Template, isInput bool, no int) string

func ParseData

func ParseData(f *os.File, t Template, isInput bool, no int) error

func ParseDescriptions

func ParseDescriptions(f *os.File, t Template) error

func ParseHint

func ParseHint(f *os.File, t Template) error

func ParseMarkdownFile

func ParseMarkdownFile(f *os.File, t Template, i string) error

func ParseSamples

func ParseSamples(f *os.File, t Template) error

func ParseTests

func ParseTests(f *os.File, t Template, size int) error

Types

type File

type File struct {
	Path    string
	Name    string
	Ext     string
	Content string
}

type Template

type Template map[string]File

func NewTemplate

func NewTemplate(path string) Template

func NewTemplateWithViper

func NewTemplateWithViper(path string) (Template, *viper.Viper, error)

Jump to

Keyboard shortcuts

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