From 0b7e6fc507682cebdc2d7145ce06bad18c4a7de0 Mon Sep 17 00:00:00 2001 From: Aaron L Date: Mon, 8 Aug 2016 00:42:13 -0700 Subject: [PATCH] Seperator -> Separator --- boil/helpers.go | 2 +- boil/query.go | 6 +++--- boil/query_builders.go | 2 +- boil/query_test.go | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/boil/helpers.go b/boil/helpers.go index 7d70a93..cfa77f7 100644 --- a/boil/helpers.go +++ b/boil/helpers.go @@ -224,7 +224,7 @@ func Update(columns map[string]interface{}) string { return strings.Join(names, ", ") } -// SetParamNames takes a slice of columns and returns a comma seperated +// SetParamNames takes a slice of columns and returns a comma separated // list of parameter names for a template statement SET clause. // eg: "col1"=$1, "col2"=$2, "col3"=$3 func SetParamNames(columns []string) string { diff --git a/boil/query.go b/boil/query.go index 32c3fa5..b0865fe 100644 --- a/boil/query.go +++ b/boil/query.go @@ -36,7 +36,7 @@ type Query struct { type where struct { clause string - orSeperator bool + orSeparator bool args []interface{} } @@ -180,9 +180,9 @@ func SetWhere(q *Query, clause string, args ...interface{}) { q.where = append([]where(nil), where{clause: clause, args: args}) } -// SetLastWhereAsOr sets the or seperator for the last element in the where slice +// SetLastWhereAsOr sets the or separator for the last element in the where slice func SetLastWhereAsOr(q *Query) { - q.where[len(q.where)-1].orSeperator = true + q.where[len(q.where)-1].orSeparator = true } // ApplyGroupBy on the query. diff --git a/boil/query_builders.go b/boil/query_builders.go index b227843..07e39c8 100644 --- a/boil/query_builders.go +++ b/boil/query_builders.go @@ -180,7 +180,7 @@ func whereClause(q *Query) (string, []interface{}) { if i >= len(q.where)-1 { continue } - if q.where[i].orSeperator { + if q.where[i].orSeparator { buf.WriteString(" OR ") } else { buf.WriteString(" AND ") diff --git a/boil/query_test.go b/boil/query_test.go index 371c69c..7e5c787 100644 --- a/boil/query_test.go +++ b/boil/query_test.go @@ -12,8 +12,8 @@ func TestSetLastWhereAsOr(t *testing.T) { AppendWhere(q, "") - if q.where[0].orSeperator { - t.Errorf("Do not want or seperator") + if q.where[0].orSeparator { + t.Errorf("Do not want or separator") } SetLastWhereAsOr(q) @@ -21,8 +21,8 @@ func TestSetLastWhereAsOr(t *testing.T) { if len(q.where) != 1 { t.Errorf("Want len 1") } - if !q.where[0].orSeperator { - t.Errorf("Want or seperator") + if !q.where[0].orSeparator { + t.Errorf("Want or separator") } AppendWhere(q, "") @@ -31,10 +31,10 @@ func TestSetLastWhereAsOr(t *testing.T) { if len(q.where) != 2 { t.Errorf("Want len 2") } - if q.where[0].orSeperator != true { + if q.where[0].orSeparator != true { t.Errorf("Expected true") } - if q.where[1].orSeperator != true { + if q.where[1].orSeparator != true { t.Errorf("Expected true") } }