From 4c462a1ec588e38420ff95ceabdd4b03425e1b6d Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Mon, 26 Jun 2023 17:03:09 -0600 Subject: [PATCH] Export InfoType for BaseThreadState to make it modifiable in libraries --- thread.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/thread.go b/thread.go index 582d3d9..f671cfd 100644 --- a/thread.go +++ b/thread.go @@ -62,7 +62,7 @@ type BaseThreadState struct { parent Thread children []Thread child_info map[NodeID] ThreadInfo - info_type reflect.Type + InfoType reflect.Type } type BaseThreadStateJSON struct { @@ -116,11 +116,11 @@ func (state * BaseThreadState) AddChild(child Thread, info ThreadInfo) error { return fmt.Errorf("Will not connect the same child twice") } - if info == nil && state.info_type != nil { + if info == nil && state.InfoType != nil { return fmt.Errorf("nil info passed when expecting info") } else if info != nil { - if reflect.TypeOf(info) != state.info_type { - return fmt.Errorf("info type mismatch, expecting %+v", state.info_type) + if reflect.TypeOf(info) != state.InfoType { + return fmt.Errorf("info type mismatch, expecting %+v", state.InfoType) } }