all: gofmt -w -r 'interface{} -> any' (#2874)

This commit is contained in:
Ariel Mashraki
2022-08-19 18:23:04 +03:00
committed by GitHub
parent b6c185a660
commit 2c63d1d70e
619 changed files with 3449 additions and 3449 deletions

View File

@@ -24,8 +24,8 @@ in the LICENSE file in the root directory of this source tree.
{{ end }}
// scanValues returns the types for scanning values from sql.Rows.
func (*{{ $.Name }}) scanValues(columns []string) ([]interface{}, error) {
values := make([]interface{}, len(columns))
func (*{{ $.Name }}) scanValues(columns []string) ([]any, error) {
values := make([]any, len(columns))
for i := range columns {
switch columns[i] {
{{- range $type, $columns := $ctypes }}
@@ -46,7 +46,7 @@ func (*{{ $.Name }}) scanValues(columns []string) ([]interface{}, error) {
// assignValues assigns the values that were returned from sql.Rows (after scanning)
// to the {{ $.Name }} fields.
func ({{ $receiver }} *{{ $.Name }}) assignValues(columns []string, values []interface{}) error {
func ({{ $receiver }} *{{ $.Name }}) assignValues(columns []string, values []any) error {
if m, n := len(values), len(columns); m < n {
return fmt.Errorf("mismatch number of scan values: %d != %d", m, n)
}