diff options
author | 2021-09-08 21:13:54 +0100 | |
---|---|---|
committer | 2021-09-08 21:13:54 +0100 | |
commit | 6a2d0d9508392425392738743fa4dd5b5d93bdb4 (patch) | |
tree | 2c076235c197acbb9080745fc79a4b41aaa5452e /vendor/github.com/uptrace/bun/schema/formatter.go | |
parent | update sqlite library -> v1.13.0 (diff) | |
parent | Merge pull request #195 from NyaaaWhatsUpDoc/update/bun-library (diff) | |
download | gotosocial-6a2d0d9508392425392738743fa4dd5b5d93bdb4.tar.xz |
Merge remote-tracking branch 'upstream/main' into update/sqlite-library
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
Diffstat (limited to 'vendor/github.com/uptrace/bun/schema/formatter.go')
-rw-r--r-- | vendor/github.com/uptrace/bun/schema/formatter.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/github.com/uptrace/bun/schema/formatter.go b/vendor/github.com/uptrace/bun/schema/formatter.go index 7b26fbaca..45a246307 100644 --- a/vendor/github.com/uptrace/bun/schema/formatter.go +++ b/vendor/github.com/uptrace/bun/schema/formatter.go @@ -89,10 +89,10 @@ func (f Formatter) AppendQuery(dst []byte, query string, args ...interface{}) [] func (f Formatter) append(dst []byte, p *parser.Parser, args []interface{}) []byte { var namedArgs NamedArgAppender if len(args) == 1 { - var ok bool - namedArgs, ok = args[0].(NamedArgAppender) - if !ok { - namedArgs, _ = newStructArgs(f, args[0]) + if v, ok := args[0].(NamedArgAppender); ok { + namedArgs = v + } else if v, ok := newStructArgs(f, args[0]); ok { + namedArgs = v } } |