What do you want to save?
Add Code snippet
New code examples
-
Go 2021-09-13 13:39:03
extract value from interface in golang
// extracts interface value to known string type. func extractValueFromInterface(value interface{}) { str, ok := value.(string) if ok { fmt.Printf("string value is: %q\n", str) } else { fmt.Printf("value is not a string: %v\n", ... Add solution