Skip to content

Commit

Permalink
Apply go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
alallema committed Apr 28, 2022
1 parent 69ca94a commit 78f9a9c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions index_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -919,13 +919,13 @@ func TestIndex_SearchWithSort(t *testing.T) {

func TestIndex_SearchOnNestedFileds(t *testing.T) {
type args struct {
UID string
PrimaryKey string
client *Client
query string
request SearchRequest
UID string
PrimaryKey string
client *Client
query string
request SearchRequest
searchableAttribute []string
sortableAttribute []string
sortableAttribute []string
}
tests := []struct {
name string
Expand Down Expand Up @@ -1021,9 +1021,9 @@ func TestIndex_SearchOnNestedFileds(t *testing.T) {
{
name: "TestIndexSearchOnNestedFieldsWithSortableAttribute",
args: args{
UID: "TestIndexSearchOnNestedFieldsWithSortableAttribute",
client: defaultClient,
query: "An awesome",
UID: "TestIndexSearchOnNestedFieldsWithSortableAttribute",
client: defaultClient,
query: "An awesome",
request: SearchRequest{
Sort: []string{
"info.reviewNb:desc",
Expand Down
14 changes: 7 additions & 7 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ func SetUpIndexWithNestedFields(indexUID string) {
index := client.Index(indexUID)

documents := []map[string]interface{}{
{"id": 1, "title": "Pride and Prejudice", "info": map[string]interface{}{"comment": "A great book", "reviewNb": 50}},
{"id": 2, "title": "Le Petit Prince", "info": map[string]interface{}{"comment": "A french book", "reviewNb": 600}},
{"id": 3, "title": "Le Rouge et le Noir", "info": map[string]interface{}{"comment": "Another french book", "reviewNb": 700}},
{"id": 4, "title": "Alice In Wonderland", "comment": "A weird book", "info": map[string]interface{}{"comment": "A weird book", "reviewNb": 800}},
{"id": 5, "title": "The Hobbit", "info": map[string]interface{}{"comment": "An awesome book", "reviewNb": 900}},
{"id": 6, "title": "Harry Potter and the Half-Blood Prince", "info": map[string]interface{}{"comment": "The best book", "reviewNb": 1000}},
{"id": 7, "title": "The Hitchhiker's Guide to the Galaxy"},
{"id": 1, "title": "Pride and Prejudice", "info": map[string]interface{}{"comment": "A great book", "reviewNb": 50}},
{"id": 2, "title": "Le Petit Prince", "info": map[string]interface{}{"comment": "A french book", "reviewNb": 600}},
{"id": 3, "title": "Le Rouge et le Noir", "info": map[string]interface{}{"comment": "Another french book", "reviewNb": 700}},
{"id": 4, "title": "Alice In Wonderland", "comment": "A weird book", "info": map[string]interface{}{"comment": "A weird book", "reviewNb": 800}},
{"id": 5, "title": "The Hobbit", "info": map[string]interface{}{"comment": "An awesome book", "reviewNb": 900}},
{"id": 6, "title": "Harry Potter and the Half-Blood Prince", "info": map[string]interface{}{"comment": "The best book", "reviewNb": 1000}},
{"id": 7, "title": "The Hitchhiker's Guide to the Galaxy"},
}
task, err := index.AddDocuments(documents)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions version_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package meilisearch

import (
"testing"
"fmt"
"regexp"
"testing"

"github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func TestVersion_GetQualifiedVersion(t *testing.T) {
Expand Down

0 comments on commit 78f9a9c

Please sign in to comment.