From f9638f36339dfd7eeb9f09b741c68541a6184c85 Mon Sep 17 00:00:00 2001 From: Andrew Martin Date: Tue, 17 Feb 2015 10:19:42 +1100 Subject: [PATCH] linting --- scope_private.go | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/scope_private.go b/scope_private.go index 5670b8a1..1151f481 100644 --- a/scope_private.go +++ b/scope_private.go @@ -215,26 +215,26 @@ func (scope *Scope) whereSql() (sql string) { return } -func (s *Scope) selectSql() string { - if len(s.Search.Selects) == 0 { +func (scope *Scope) selectSql() string { + if len(scope.Search.Selects) == 0 { return "*" } var selectQueries []string - for _, clause := range s.Search.Selects { - selectQueries = append(selectQueries, s.buildSelectQuery(clause)) + for _, clause := range scope.Search.Selects { + selectQueries = append(selectQueries, scope.buildSelectQuery(clause)) } return strings.Join(selectQueries, ", ") } -func (s *Scope) orderSql() string { - if len(s.Search.Orders) == 0 { +func (scope *Scope) orderSql() string { + if len(scope.Search.Orders) == 0 { return "" } else { - return " ORDER BY " + strings.Join(s.Search.Orders, ",") + return " ORDER BY " + strings.Join(scope.Search.Orders, ",") } } @@ -245,9 +245,10 @@ func (s *Scope) limitSql() string { } else { return " LIMIT " + s.Search.Limit } - } else { - return "" } + + return "" + } func (s *Scope) topSql() string {