summaryrefslogtreecommitdiff
path: root/vendor/github.com/uptrace/bun/schema/formatter.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2021-09-08 20:22:24 +0100
committerLibravatar GitHub <noreply@github.com>2021-09-08 20:22:24 +0100
commit299801f299737364cdd3e5a526bd40df5c48ca93 (patch)
tree2d0926cdcf3088781842a83fd8ed50593006ccc2 /vendor/github.com/uptrace/bun/schema/formatter.go
parentrework media processing a little bit (#191) (diff)
parentupdate bun library -> v1.0.4 (diff)
downloadgotosocial-299801f299737364cdd3e5a526bd40df5c48ca93.tar.xz
Merge pull request #195 from NyaaaWhatsUpDoc/update/bun-library
update bun library -> v1.0.4
Diffstat (limited to 'vendor/github.com/uptrace/bun/schema/formatter.go')
-rw-r--r--vendor/github.com/uptrace/bun/schema/formatter.go8
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
}
}