exercise

package
v0.0.0-...-789ade6 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Compile = "compile"
	Test    = "test"
)
View Source
const Regex = `\/\/\s*I\s+AM\s+NOT\s+DONE\b`

Regex pattern for //I AM NOT DONE

Variables

This section is empty.

Functions

func GetExercises

func GetExercises() (*[]Exercise, error)

Get list of exercises

Types

type Exercise

type Exercise struct {
	Name string `yaml:"name"`
	Type string `yaml:"type"`
	File string `yaml:"file"`
}
func Search(name string) (*Exercise, error)

Search for particular exercise

func (*Exercise) Run

func (e *Exercise) Run() Result

func (*Exercise) State

func (e *Exercise) State() State

Get state of the exercise by checking if "I AM NOT DONE" is being removed from the exercise or not.

type Result

type Result struct {
	Output string
	Err    string
}

type State

type State int
const (
	Done State = iota
	Pending
)

Enum for exercise's state

Jump to

Keyboard shortcuts

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