all: use any instead of interface{}
My favorite part of generics. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
committed by
Josh Bleecher Snyder
parent
5f176f24db
commit
0868329936
+1
-1
@@ -30,7 +30,7 @@ func (b Bool) Get() (v bool, ok bool) {
|
||||
}
|
||||
|
||||
// Scan implements database/sql.Scanner.
|
||||
func (b *Bool) Scan(src interface{}) error {
|
||||
func (b *Bool) Scan(src any) error {
|
||||
if src == nil {
|
||||
*b = ""
|
||||
return nil
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
func TestBool(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
in interface{}
|
||||
in any
|
||||
want string // JSON
|
||||
}{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user