Documentation ¶
Index ¶
Constants ¶
const ( // HWAll represents all items in the collection. HWAll = iota // HWUpdated represents problems that were already on the // user's filesystem, where one or more new files have been added. HWUpdated // HWNew represents problems that did not yet exist on the // user's filesystem. HWNew // HWNotSubmitted represents problems that have not been submitted // for review. HWNotSubmitted )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Curriculum ¶
Curriculum is a collection of language tracks.
func NewCurriculum ¶
func NewCurriculum(tracks []*api.Track) *Curriculum
NewCurriculum returns a collection of language tracks.
func (*Curriculum) Report ¶
func (cur *Curriculum) Report(status Status)
Report creates a table of the tracks that have the requested status.
type Homework ¶
type Homework struct { Items []*Item // contains filtered or unexported fields }
Homework is a collection of problems that were fetched from the APIs.
func NewHomework ¶
NewHomework decorates a problem set with some additional data based on the user's system.
func (*Homework) ItemsMatching ¶
ItemsMatching returns a subset of the set of problems.
func (*Homework) Report ¶
Report outputs a list of the problems in the set. It prints the track name, the problem name, and the full path to the problem on the user's filesystem.
func (*Homework) Summarize ¶
func (hw *Homework) Summarize(summaryFilter SummaryOption)
Summarize prints a full report of new and updated items in the set.
type Item ¶
Item is a problem that has been fetched from the APIs. It contains some data specific to this particular request and user in order to give a useful report to the user about what has been fetched.
type Status ¶
type Status bool
Status is the status of a track (active/inactive).
const ( // TrackActive represents an active track. // Problems from active tracks will be delivered with the `fetch` command. TrackActive Status = true // TrackInactive represents an inactive track. // It is possible to fetch problems from an inactive track, and // submit them to the website, but these will not automatically be // delivered in the global `fetch` command. TrackInactive Status = false )
type SummaryOption ¶
type SummaryOption HWFilter
SummaryOption is an alias of HWFilter that allows selective display of summary items