Skip to content

Commit

Permalink
Mark exercises as new. Fixes #66
Browse files Browse the repository at this point in the history
When fetching new exercises, it's helpful to have an indicator of which
exercise you have not yet submitted any code for, especially since the
exercises are now listed in alphabetical order, not in any particular
order of completion.
  • Loading branch information
kytrinyx committed Mar 14, 2014
1 parent f6da29c commit 5b672ee
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions assignment.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import (
)

type Assignment struct {
Track string
Slug string
Files map[string]string
Track string
Slug string
Files map[string]string
IsFresh bool `json:"fresh"`
}

func SaveAssignment(dir string, a Assignment) (err error) {
Expand All @@ -35,7 +36,11 @@ func SaveAssignment(dir string, a Assignment) (err error) {
}
}

fmt.Println(a.Track, "-", a.Slug)
fresh := " "
if a.IsFresh {
fresh = "*"
}
fmt.Println(fresh, a.Track, "-", a.Slug)

return
}

0 comments on commit 5b672ee

Please sign in to comment.