about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/seed.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/seed.go b/src/seed.go
index fde4265..5dc849c 100644
--- a/src/seed.go
+++ b/src/seed.go
@@ -78,13 +78,18 @@ func getChallengesFromSeedFile() {
 func generateJSONFromChallenges() (string, error) {
 	// To avoid leakage of container name or the flag towards the user, we need to strip the challenges
 	var strippedChallenges []StrippedChallenge
+	categories := map[string]int{}
 
 	for _, challenge := range challenges {
+		// Append challenge to list
 		strippedChallenges = append(strippedChallenges, stripChallenge(challenge))
+
+		categories[challenge.Category]++
 	}
 
-	marshalled, marshalError := json.Marshal(map[string][]StrippedChallenge{
+	marshalled, marshalError := json.Marshal(map[string]interface{}{
 		"challenges": strippedChallenges,
+		"categories": categories,
 	})
 	return string(marshalled), marshalError
 }