diff options
Diffstat (limited to 'reflect.go')
| -rw-r--r-- | reflect.go | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -1,10 +1,36 @@ package widget +/* + widget is a low level package that just defines the gui package + interaction with the toolkits. + + For simplicity, it seems to make sense to put type conversion functions + here for now +*/ + import ( "reflect" "strconv" ) +/* +// TODO: this syntax or the other syntax? + +func convertString(val any) string { + switch v := val.(type) { + case bool: + n.B = val.(bool) + case string: + n.label = val.(string) + n.S = val.(string) + case int: + n.I = val.(int) + default: + log.Error(errors.New("Set() unknown type"), "v =", v) + } +} +*/ + func GetString(A any) string { if A == nil { // log.Warn("getString() got nil") |
