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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user