Skip to content

Commit 5b672ee

Browse files
committed
Mark exercises as new. Fixes #66
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.
1 parent f6da29c commit 5b672ee

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

assignment.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ import (
88
)
99

1010
type Assignment struct {
11-
Track string
12-
Slug string
13-
Files map[string]string
11+
Track string
12+
Slug string
13+
Files map[string]string
14+
IsFresh bool `json:"fresh"`
1415
}
1516

1617
func SaveAssignment(dir string, a Assignment) (err error) {
@@ -35,7 +36,11 @@ func SaveAssignment(dir string, a Assignment) (err error) {
3536
}
3637
}
3738

38-
fmt.Println(a.Track, "-", a.Slug)
39+
fresh := " "
40+
if a.IsFresh {
41+
fresh = "*"
42+
}
43+
fmt.Println(fresh, a.Track, "-", a.Slug)
3944

4045
return
4146
}

0 commit comments

Comments
 (0)