file

package
v0.0.0-...-d9d2bad Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Mayuan 马原
	Mayuan = iota
	// Maogai 毛概
	Maogai
)

Variables

This section is empty.

Functions

func WriteArchive

func WriteArchive(sub Subject, history History)

WriteArchive 将历史写入对应文件

Types

type History

type History struct {
	Progress      int
	ErrorProblems []int
}

History 存储顺序刷题的进度和错误题目的题号

func ReadArchive

func ReadArchive(sub Subject) History

ReadArchive 读取指定科目的历史文件

type Problem

type Problem struct {
	Description string
	Answer      string
	Choice      []string
}

Problem 题目结构体

func LoadData

func LoadData(sub Subject) []Problem

LoadData 通过科目获取题目切片

type Subject

type Subject int

Subject 代表科目

Jump to

Keyboard shortcuts

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