diff options
| author | Jeff Carr <[email protected]> | 2025-09-16 09:53:13 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-16 09:53:13 -0500 |
| commit | f2978a0605bcf0989f54d75878266b371926d72f (patch) | |
| tree | 65700257358ffb007d2af34d2645a6a2b153f2b8 /tablePB.go | |
| parent | b53d68d6b80081c4459e9d4a44d4059153e211dc (diff) | |
strings as 'any' nowv0.0.7
Diffstat (limited to 'tablePB.go')
| -rw-r--r-- | tablePB.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -144,6 +144,14 @@ func getAnyCell(t *guipb.Table, name string, row int) (string, bool) { switch col.Attr.Type { case guipb.ColAttr_STRING: // return col.Vals[row] true + // Assume 'anyVal' is an element from your r.Vals slice + var stringValue wrapperspb.StringValue + if err := anyVal.UnmarshalTo(&stringValue); err == nil { + // It's a string, now convert it back to a native Go string + goString := stringValue.GetValue() + // fmt.Printf("Successfully unpacked string: %s\n", goString) + return goString, true + } case guipb.ColAttr_INT: var finalInt int32 // 1. Check if the Any contains an Int32Value |
