Skip to content

Bug: pass []any as any in RawQuery.AppendQuery #610

Closed
@alingse

Description

@alingse

see github actions result here https://github.com/alingse/asasalint/runs/7270913876?check_suite_focus=true

Error: /home/runner/work/asasalint/asasalint/bun/query_raw.go:42:39: pass []any as any to func AppendQuery func(dst []byte, query string, args ...interface{}) []byte
func (q *RawQuery) AppendQuery(fmter schema.Formatter, b []byte) ([]byte, error) {
	return fmter.AppendQuery(b, q.query, q.args), nil
}

func (f Formatter) AppendQuery(dst []byte, query string, args ...interface{}) []byte {
	if f.IsNop() || (args == nil && f.args == nil) || strings.IndexByte(query, '?') == -1 {
		return append(dst, query...)
	}
	return f.append(dst, parser.NewString(query), args)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions