From 5b672ee7bf26859c41de9eed83396b7454286063 Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Thu, 13 Mar 2014 20:36:20 -0400 Subject: [PATCH] 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. --- assignment.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/assignment.go b/assignment.go index e1e554e2b..f30929ac3 100644 --- a/assignment.go +++ b/assignment.go @@ -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) { @@ -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 }