Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3077a406a1 | |||
| 48ca06a23c | |||
| 942841787a |
@@ -0,0 +1,36 @@
|
||||
# Those tests are allowed to fail. They don't represent an officially supported\
|
||||
# situation, but rather ones that are nice to have.
|
||||
name: experimental
|
||||
on:
|
||||
# Not ready for merged commits yet.
|
||||
# push:
|
||||
# branches:
|
||||
# - v2
|
||||
pull_request:
|
||||
branches:
|
||||
- v2
|
||||
|
||||
jobs:
|
||||
linux32:
|
||||
name: linux 386
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup go
|
||||
uses: actions/setup-go@master
|
||||
with:
|
||||
go-version: 1.19
|
||||
- name: Run unit tests
|
||||
run: GOARCH=386 go test ./...
|
||||
tinygo:
|
||||
name: tinygo 0.25.0
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: tinygo test ./...
|
||||
run: |
|
||||
docker run --rm -v $(pwd):/src -w /src tinygo/tinygo:0.25.0 tinygo test ./...
|
||||
+2
-2
@@ -1140,7 +1140,7 @@ func fieldByIndex(v reflect.Value, path []int) reflect.Value {
|
||||
for i, x := range path {
|
||||
v = v.Field(x)
|
||||
|
||||
if i < len(path)-1 && v.Kind() == reflect.Pointer {
|
||||
if i < len(path)-1 && v.Kind() == reflect.Ptr {
|
||||
if v.IsNil() {
|
||||
v.Set(reflect.New(v.Type().Elem()))
|
||||
}
|
||||
@@ -1208,7 +1208,7 @@ func forEachField(t reflect.Type, path []int, do func(name string, path []int))
|
||||
|
||||
if f.Anonymous && name == "" {
|
||||
t2 := f.Type
|
||||
if t2.Kind() == reflect.Pointer {
|
||||
if t2.Kind() == reflect.Ptr {
|
||||
t2 = t2.Elem()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user