1
0
mirror of https://github.com/docker/docs.git synced 2026-11-05 00:14:17 +03:00

Merge pull request #1506 from ericsage/1502

Return better error for issue #1502.
This commit is contained in:
Nathan LeClaire
2015-07-13 17:33:30 -07:00

View File

@@ -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 {