@@ -276,6 +276,20 @@ func (s *submitCmdContext) _documents(filepaths []string, exercise workspace.Exe
276
276
return docs , nil
277
277
}
278
278
279
+ func (s * submitCmdContext ) printResult () {
280
+ msg := `
281
+
282
+ Your solution has been submitted successfully.
283
+ %s
284
+ `
285
+ suffix := "View it at:\n \n "
286
+ if s .metadata .AutoApprove && s .metadata .Team == "" {
287
+ suffix = "You can complete the exercise and unlock the next core exercise at:\n "
288
+ }
289
+ fmt .Fprintf (Err , msg , suffix )
290
+ fmt .Fprintf (Out , " %s\n \n " , s .metadata .URL )
291
+ }
292
+
279
293
type submission struct {
280
294
documents []workspace.Document
281
295
metadata * workspace.ExerciseMetadata
@@ -344,20 +358,6 @@ func (s submission) submit(usrCfg *viper.Viper) error {
344
358
return nil
345
359
}
346
360
347
- func (s submission ) printResult () {
348
- msg := `
349
-
350
- Your solution has been submitted successfully.
351
- %s
352
- `
353
- suffix := "View it at:\n \n "
354
- if s .metadata .AutoApprove && s .metadata .Team == "" {
355
- suffix = "You can complete the exercise and unlock the next core exercise at:\n "
356
- }
357
- fmt .Fprintf (Err , msg , suffix )
358
- fmt .Fprintf (Out , " %s\n \n " , s .metadata .URL )
359
- }
360
-
361
361
func (s submission ) validate () error {
362
362
if s .metadata .ID == "" {
363
363
return errors .New ("id is empty" )
0 commit comments