File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,29 @@ func main() {
1515 app .Usage = "A command line tool to interact with http://exercism.io"
1616 app .Version = VERSION
1717 app .Commands = []cli.Command {
18+ {
19+ Name : "current" ,
20+ ShortName : "c" ,
21+ Usage : "Show the current assignments" ,
22+ Action : func (c * cli.Context ) {
23+ config , err := ConfigFromFile (HomeDir ())
24+ if err != nil {
25+ fmt .Println ("Are you sure you are logged in? Please login again." )
26+ return
27+ }
28+ currentAssignments , err := FetchAssignments (config , FetchEndpoints ["current" ])
29+ if err != nil {
30+ fmt .Println (err )
31+ return
32+ }
33+
34+ fmt .Println ("Current Assignments" )
35+
36+ for _ , a := range currentAssignments {
37+ fmt .Printf ("%v: %v\n " , strings .Title (a .Track ), a .Slug )
38+ }
39+ },
40+ },
1841 {
1942 Name : "demo" ,
2043 ShortName : "d" ,
You can’t perform that action at this time.
0 commit comments