You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lo...@apache.org on 2019/10/02 16:49:56 UTC

[beam] 01/01: [Go-SDK] Check correct cache for wrapped structs.

This is an automated email from the ASF dual-hosted git repository.

lostluck pushed a commit to branch lostluck-patch-1
in repository https://gitbox.apache.org/repos/asf/beam.git

commit 56fb071e4b212e9150e27c66e2e937b8c9e865de
Author: Robert Burke <lo...@users.noreply.github.com>
AuthorDate: Wed Oct 2 09:49:20 2019 -0700

    [Go-SDK] Check correct cache for wrapped structs.
---
 sdks/go/pkg/beam/core/util/reflectx/structs.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sdks/go/pkg/beam/core/util/reflectx/structs.go b/sdks/go/pkg/beam/core/util/reflectx/structs.go
index 4c38cf5..84f9be9 100644
--- a/sdks/go/pkg/beam/core/util/reflectx/structs.go
+++ b/sdks/go/pkg/beam/core/util/reflectx/structs.go
@@ -44,7 +44,7 @@ func RegisterStructWrapper(t reflect.Type, wrapper func(interface{}) map[string]
 	}
 
 	key := t.String()
-	if _, exists := funcs[key]; exists {
+	if _, exists := structFuncs[key]; exists {
 		log.Warnf(context.Background(), "StructWrapper for %v already registered. Overwriting.", key)
 	}
 	structFuncs[key] = wrapper