mirror of https://github.com/docker/docs.git
Merge pull request #1506 from ericsage/1502
Return better error for issue #1502.
This commit is contained in:
commit
cd55ca0030
|
@ -1,6 +1,7 @@
|
|||
package commands
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
@ -87,6 +88,9 @@ func parseFilters(filters []string) (FilterOptions, error) {
|
|||
options := FilterOptions{}
|
||||
for _, f := range filters {
|
||||
kv := strings.SplitN(f, "=", 2)
|
||||
if len(kv) != 2 {
|
||||
return options, errors.New("Unsupported filter syntax.")
|
||||
}
|
||||
key, value := kv[0], kv[1]
|
||||
|
||||
switch key {
|
||||
|
|
Loading…
Reference in New Issue