aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/reflect
diff options
context:
space:
mode:
authordkegel-fastly <[email protected]>2024-04-22 11:10:13 -0700
committerGitHub <[email protected]>2024-04-22 11:10:13 -0700
commit3d433fe9f15dc6cff400ce7fd03cf15ad55f64fc (patch)
tree3e4f853cb177ccb0cc4788eed8dc28a823ab4ddf /src/reflect
parent1154212c15e6e97048e122068730dab5a1a9427f (diff)
downloadtinygo-3d433fe9f15dc6cff400ce7fd03cf15ad55f64fc.tar.gz
tinygo-3d433fe9f15dc6cff400ce7fd03cf15ad55f64fc.zip
Lint: lint and fix src/{os,reflect} (#4228)
* lint: expand to src/{os,reflect}, fix or suppress what it found * internal/tools/tools.go: the tools idiom requires a build tag guard to avoid go test complaints
Diffstat (limited to 'src/reflect')
-rw-r--r--src/reflect/value_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/reflect/value_test.go b/src/reflect/value_test.go
index 6641750b9..40f0919bd 100644
--- a/src/reflect/value_test.go
+++ b/src/reflect/value_test.go
@@ -489,7 +489,7 @@ func TestTinyStruct(t *testing.T) {
func TestTinyZero(t *testing.T) {
s := "hello, world"
- var sptr *string = &s
+ sptr := &s
v := ValueOf(&sptr).Elem()
v.Set(Zero(v.Type()))
@@ -535,7 +535,7 @@ func TestTinyAddr(t *testing.T) {
}
func TestTinyNilType(t *testing.T) {
- var a any = nil
+ var a any
typ := TypeOf(a)
if typ != nil {
t.Errorf("Type of any{nil} is not nil")