Chromium Code Reviews| Index: service/datastore/index.go |
| diff --git a/service/datastore/index.go b/service/datastore/index.go |
| index db49d2fe85b08814dd81de8e0e1f055dc8ac7153..fe0ca4fd4fd67d7007ecd705a0546bb1a8b88ead 100644 |
| --- a/service/datastore/index.go |
| +++ b/service/datastore/index.go |
| @@ -217,7 +217,7 @@ func (id *IndexDefinition) Builtin() bool { |
| // |
| // NOTE: !Builtin() does not imply Compound(). |
| func (id *IndexDefinition) Compound() bool { |
| - if id.Kind == "" || len(id.SortBy) <= 1 { |
| + if id.Kind == "" || id.Builtin() { |
|
iannucci
2015/09/29 04:43:28
duplicate logic is duplicate.
|
| return false |
| } |
| for _, sb := range id.SortBy { |
| @@ -234,7 +234,7 @@ func (id *IndexDefinition) Compound() bool { |
| // an error. |
| func (id *IndexDefinition) YAMLString() (string, error) { |
| if id.Builtin() || !id.Compound() { |
| - return "", fmt.Errorf("cannot generate YAML for this IndexDefinition") |
| + return "", fmt.Errorf("cannot generate YAML for %s", id) |
| } |
| ret := bytes.Buffer{} |