chore: change interface{} to any (#2818)

* chore: change interface{} to any

* chore: update goctl version to 1.5.0

* chore: update goctl deps
This commit is contained in:
Kevin Wan
2023-01-24 16:32:02 +08:00
committed by GitHub
parent 7e0ac77139
commit ae87114282
221 changed files with 1910 additions and 2207 deletions

View File

@@ -64,7 +64,7 @@ func (bi *BulkInserter) Flush() {
}
// Insert inserts given args.
func (bi *BulkInserter) Insert(args ...interface{}) error {
func (bi *BulkInserter) Insert(args ...any) error {
value, err := format(bi.stmt.valueFormat, args...)
if err != nil {
return err
@@ -110,12 +110,12 @@ type dbInserter struct {
resultHandler ResultHandler
}
func (in *dbInserter) AddTask(task interface{}) bool {
func (in *dbInserter) AddTask(task any) bool {
in.values = append(in.values, task.(string))
return len(in.values) >= maxBulkRows
}
func (in *dbInserter) Execute(bulk interface{}) {
func (in *dbInserter) Execute(bulk any) {
values := bulk.([]string)
if len(values) == 0 {
return
@@ -135,7 +135,7 @@ func (in *dbInserter) Execute(bulk interface{}) {
}
}
func (in *dbInserter) RemoveAll() interface{} {
func (in *dbInserter) RemoveAll() any {
values := in.values
in.values = nil
return values