mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Add field labels to struct literals
This commit is contained in:
parent
29eba09e1e
commit
23e2961d65
2 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ func TestPostIndexRequestUnmarshalJSON(t *testing.T) {
|
|||
err string
|
||||
}{
|
||||
{json: `{"options": {}}`, expected: postIndexRequest{Options: pilosa.IndexOptions{}}},
|
||||
{json: `{"options": {"keys": true}}`, expected: postIndexRequest{Options: pilosa.IndexOptions{true}}},
|
||||
{json: `{"options": {"keys": true}}`, expected: postIndexRequest{Options: pilosa.IndexOptions{Keys: true}}},
|
||||
{json: `{"options": 4}`, err: "options is not map[string]interface{}"},
|
||||
{json: `{"option": {}}`, err: "Unknown key: option:map[]"},
|
||||
{json: `{"options": {"badKey": "test"}}`, err: "Unknown key: badKey:test"},
|
||||
|
|
|
|||
2
index.go
2
index.go
|
|
@ -95,7 +95,7 @@ func (i *Index) Options() IndexOptions {
|
|||
}
|
||||
|
||||
func (i *Index) options() IndexOptions {
|
||||
return IndexOptions{i.keys}
|
||||
return IndexOptions{Keys: i.keys}
|
||||
}
|
||||
|
||||
// Open opens and initializes the index.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue