Skip to content

Commit

Permalink
chore: go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
darora committed Jul 28, 2021
1 parent dc2414a commit 9028045
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (c *Client) Rpc(name string, count string, rpcBody interface{}) string {
}

if count != "" && (count == `exact` || count == `planned` || count == `estimated`) {
req.Header.Add("Prefer", "count=" + count)
req.Header.Add("Prefer", "count="+count)
}

resp, err := c.session.Do(req)
Expand Down
10 changes: 5 additions & 5 deletions filterbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ func (f *FilterBuilder) In(column string, values []string) *FilterBuilder {
}

func (f *FilterBuilder) Contains(column string, value []string) *FilterBuilder {
f.params[column] = "cs."+strings.Join(value, ",")
f.params[column] = "cs." + strings.Join(value, ",")
return f
}

func (f *FilterBuilder) ContainedBy(column string, value []string) *FilterBuilder {
f.params[column] = "cd."+strings.Join(value, ",")
f.params[column] = "cd." + strings.Join(value, ",")
return f
}

Expand All @@ -151,7 +151,7 @@ func (f *FilterBuilder) ContainsObject(column string, value interface{}) *Filter
if err != nil {
f.client.ClientError = err
}
f.params[column] = "cs."+string(sum)
f.params[column] = "cs." + string(sum)
return f
}

Expand All @@ -160,7 +160,7 @@ func (f *FilterBuilder) ContainedByObject(column string, value interface{}) *Fil
if err != nil {
f.client.ClientError = err
}
f.params[column] = "cs."+string(sum)
f.params[column] = "cs." + string(sum)
return f
}

Expand Down Expand Up @@ -211,6 +211,6 @@ func (f *FilterBuilder) TextSearch(column, userQuery, config, tsType string) *Fi
if config != "" {
configPart = fmt.Sprintf("(%s)", config)
}
f.params[column] = typePart+"fts"+configPart+"."+userQuery
f.params[column] = typePart + "fts" + configPart + "." + userQuery
return f
}
16 changes: 8 additions & 8 deletions transformbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
)

type TransformBuilder struct {
client *Client
method string
body []byte
headers map[string]string
params map[string]string
client *Client
method string
body []byte
headers map[string]string
params map[string]string
}

func (t *TransformBuilder) ExecuteString() (string, error) {
Expand All @@ -27,7 +27,7 @@ func (t *TransformBuilder) ExecuteTo(to interface{}) error {

func (t *TransformBuilder) Limit(count int, foreignTable string) *TransformBuilder {
if foreignTable != "" {
t.params[foreignTable + ".limit"] = strconv.Itoa(count)
t.params[foreignTable+".limit"] = strconv.Itoa(count)
} else {
t.params["limit"] = strconv.Itoa(count)
}
Expand Down Expand Up @@ -70,8 +70,8 @@ func (t *TransformBuilder) Order(column, foreignTable string, ascending, nullsFi

func (t *TransformBuilder) Range(from, to int, foreignTable string) *TransformBuilder {
if foreignTable != "" {
t.params[foreignTable + ".offset"] = strconv.Itoa(from)
t.params[foreignTable + ".limit"] = strconv.Itoa(to - from + 1)
t.params[foreignTable+".offset"] = strconv.Itoa(from)
t.params[foreignTable+".limit"] = strconv.Itoa(to - from + 1)
} else {
t.params["offset"] = strconv.Itoa(from)
t.params["limit"] = strconv.Itoa(to - from + 1)
Expand Down

0 comments on commit 9028045

Please sign in to comment.