Skip to content

Commit

Permalink
[Improve] panic message about non exists mode
Browse files Browse the repository at this point in the history
  • Loading branch information
JanGalek committed Dec 16, 2024
1 parent 53b5006 commit a79fd33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package mode

import (
"errors"
"fmt"
"os"
)

Expand Down Expand Up @@ -44,7 +45,7 @@ func NewMode(additionalModes []string) *Mode {
modes = append(modes, additionalModes...)

if !modeExists(modes, mode) {
panic("mode from env doest not exists in available modes")
panic(fmt.Sprintf("mode from env doest not exists in available modes, use \"%s\"", mode))
}

return &Mode{
Expand Down

0 comments on commit a79fd33

Please sign in to comment.