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

Function getExerciseSolutionFiles

cmd/submit.go:126–141  ·  view source on GitHub ↗
(baseDir string)

Source from the content-addressed store, hash-verified

124}
125
126func getExerciseSolutionFiles(baseDir string) ([]string, error) {
127 v := viper.New()
128 v.AddConfigPath(filepath.Join(baseDir, ".exercism"))
129 v.SetConfigName("config")
130 v.SetConfigType("json")
131 err := v.ReadInConfig()
132 if err != nil {
133 return nil, errors.New("no files to submit")
134 }
135 solutionFiles := v.GetStringSlice("files.solution")
136 if len(solutionFiles) == 0 {
137 return nil, errors.New("no files to submit")
138 }
139
140 return solutionFiles, nil
141}
142
143type submitCmdContext struct {
144 usrCfg *viper.Viper

Callers 2

submit.goFile · 0.85

Calls

no outgoing calls

Tested by 1