submissionNotEmpty checks that there is at least one file to submit.
(docs []workspace.Document)
| 417 | |
| 418 | // submissionNotEmpty checks that there is at least one file to submit. |
| 419 | func (s submitValidator) submissionNotEmpty(docs []workspace.Document) error { |
| 420 | if len(docs) == 0 { |
| 421 | msg := ` |
| 422 | |
| 423 | No files found to submit. |
| 424 | |
| 425 | ` |
| 426 | return errors.New(msg) |
| 427 | } |
| 428 | return nil |
| 429 | } |
| 430 | |
| 431 | // metadataMatchesExercise checks that the metadata refers to the exercise being submitted. |
| 432 | func (s submitValidator) metadataMatchesExercise(metadata *workspace.ExerciseMetadata, exercise workspace.Exercise) error { |