MCPcopy Create free account
hub / github.com/exercism/cli / getTrack

Function getTrack

cmd/test.go:70–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68}
69
70func getTrack() (string, error) {
71 metadata, err := workspace.NewExerciseMetadata(".")
72 if err != nil {
73 return "", err
74 }
75 if metadata.Track == "" {
76 return "", fmt.Errorf("no track found in exercise metadata")
77 }
78
79 return metadata.Track, nil
80}
81
82func init() {
83 RootCmd.AddCommand(testCmd)

Callers 1

runTestFunction · 0.85

Calls 1

NewExerciseMetadataFunction · 0.92

Tested by

no test coverage detected