We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9dd0499 commit d296636Copy full SHA for d296636
cmd/submit.go
@@ -296,7 +296,7 @@ type submission struct {
296
}
297
298
// submit submits the documents to the Exercism API.
299
-func (s submission) submit(usrCfg *viper.Viper) error {
+func (s *submission) submit(usrCfg *viper.Viper) error {
300
if err := s.validate(); err != nil {
301
return err
302
@@ -358,7 +358,10 @@ func (s submission) submit(usrCfg *viper.Viper) error {
358
return nil
359
360
361
-func (s submission) validate() error {
+func (s *submission) validate() error {
362
+ if s == nil {
363
+ return errors.New("submission is empty")
364
+ }
365
if s.metadata.ID == "" {
366
return errors.New("id is empty")
367
0 commit comments