Skip to content

Commit dfc53e1

Browse files
committed
A minor improvement to the kbuilder fallback files so linters don`t complain of unused vars
1 parent 50c1a18 commit dfc53e1

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

kbuilder/insert_fallback.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@ type Insert struct {
2222
// Build is a utility function for finding the dialect based on the driver and
2323
// then calling BuildQuery(dialect)
2424
func (i Insert) Build(driver string) (sqlQuery string, params []interface{}, _ error) {
25+
_ = driver
26+
2527
panic("kbuilder is an experimental package and needs to be explicitly enabled see github.com/vingarcia/ksql/tree/master/kbuilder/README.md")
2628
}
2729

2830
// BuildQuery implements the queryBuilder interface
2931
func (i Insert) BuildQuery(dialect sqldialect.Provider) (sqlQuery string, params []interface{}, _ error) {
32+
_ = dialect
33+
3034
panic("kbuilder is an experimental package and needs to be explicitly enabled see github.com/vingarcia/ksql/tree/master/kbuilder/README.md")
3135
}

kbuilder/query_fallback.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@ type Query struct {
3131
// Build is a utility function for finding the dialect based on the driver and
3232
// then calling BuildQuery(dialect)
3333
func (q Query) Build(driver string) (sqlQuery string, params []interface{}, _ error) {
34+
_ = driver
35+
3436
panic("kbuilder is an experimental package and needs to be explicitly enabled see github.com/vingarcia/ksql/tree/master/kbuilder/README.md")
3537
}
3638

3739
// BuildQuery implements the queryBuilder interface
3840
func (q Query) BuildQuery(dialect sqldialect.Provider) (sqlQuery string, params []interface{}, _ error) {
41+
_ = dialect
42+
3943
panic("kbuilder is an experimental package and needs to be explicitly enabled see github.com/vingarcia/ksql/tree/master/kbuilder/README.md")
4044
}
4145

@@ -49,21 +53,29 @@ type WhereQueries []WhereQuery
4953
// Where adds a new boolean condition to an existing
5054
// WhereQueries helper.
5155
func (w WhereQueries) Where(cond string, params ...interface{}) WhereQueries {
56+
_, _ = cond, params
57+
5258
panic("kbuilder is an experimental package and needs to be explicitly enabled see github.com/vingarcia/ksql/tree/master/kbuilder/README.md")
5359
}
5460

5561
// WhereIf conditionally adds a new boolean expression to the WhereQueries helper.
56-
func (w WhereQueries) WhereIf(ifConf bool, cond string, params ...interface{}) WhereQueries {
62+
func (w WhereQueries) WhereIf(ifCond bool, cond string, params ...interface{}) WhereQueries {
63+
_, _, _ = ifCond, cond, params
64+
5765
panic("kbuilder is an experimental package and needs to be explicitly enabled see github.com/vingarcia/ksql/tree/master/kbuilder/README.md")
5866
}
5967

6068
// Where adds a new boolean condition to an existing
6169
// WhereQueries helper.
6270
func Where(cond string, params ...interface{}) WhereQueries {
71+
_, _ = cond, params
72+
6373
panic("kbuilder is an experimental package and needs to be explicitly enabled see github.com/vingarcia/ksql/tree/master/kbuilder/README.md")
6474
}
6575

6676
// WhereIf conditionally adds a new boolean expression to the WhereQueries helper
6777
func WhereIf(ifCond bool, cond string, params ...interface{}) WhereQueries {
78+
_, _, _ = ifCond, cond, params
79+
6880
panic("kbuilder is an experimental package and needs to be explicitly enabled see github.com/vingarcia/ksql/tree/master/kbuilder/README.md")
6981
}

0 commit comments

Comments
 (0)