mirror of
https://github.com/chuot/rdio-scanner.git
synced 2026-08-13 08:33:00 -06:00
fix: remove unnecessary error variable in command URL validation
This commit is contained in:
parent
7d97763f8f
commit
3c4da551c9
|
|
@ -95,8 +95,6 @@ func NewCommand(baseDir string) *Command {
|
|||
}
|
||||
|
||||
func (command *Command) Do(action string) {
|
||||
var err error
|
||||
|
||||
i := 1
|
||||
|
||||
readVal := func() string {
|
||||
|
|
@ -142,7 +140,7 @@ func (command *Command) Do(action string) {
|
|||
case COMMAND_ARG_URL:
|
||||
command.url = readVal()
|
||||
|
||||
if err != nil || !regexp.MustCompile(`^https?://`).Match([]byte(command.url)) {
|
||||
if !regexp.MustCompile(`^https?://`).Match([]byte(command.url)) {
|
||||
command.exitWithError(errors.New("invalid URL"))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue