helper

package
v0.0.0-...-996dd67 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CLIMode

func CLIMode()

func CheckForNext

func CheckForNext() string

func ClearScreen

func ClearScreen()

Clear the terminal to keep everything clean

func CorrectExercice

func CorrectExercice(exercicePath string, saveIt bool, output bool) bool

func DownloadFiles

func DownloadFiles(dir string)

func GetHint

func GetHint() (string, error)

Get the next hint of the pending exercice, if no more hint, a message is displayed

func GetNextExercise

func GetNextExercise(index int) (string, error)

GetNextExercise gets the next exercise from exercices.json

func Initialize

func Initialize(workingPath string) bool

func ResetFiles

func ResetFiles()

Called when reset to delete all files

func SaveConfig

func SaveConfig(config Config) error

Types

type Config

type Config struct {
	Next int    `json:"next"`
	Hint int    `json:"hint"`
	Path string `json:"path"`
}

func LoadConfig

func LoadConfig() Config

type Exercises

type Exercises struct {
	Exercises []string `json:"exercices"`
}

type GitHubFile

type GitHubFile struct {
	Name        string `json:"name"`
	Path        string `json:"path"`
	SHA         string `json:"sha"`
	Size        int    `json:"size"`
	URL         string `json:"url"`
	HTMLURL     string `json:"html_url"`
	DownloadURL string `json:"download_url"`
	Type        string `json:"type"`
}

Jump to

Keyboard shortcuts

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