code:
type String struct {
Result string
}
func main() {
result := &String{Result:"value"}
//var test string= "value"
//result := &test
testDataBase(result)
fmt.Print(result.Result) //expect:"34",but:"value"
}
func testDataBase(str interface{}) {
strV,ok := str.(String)
if ok {
strV.Result="34"
}
}
so,how can I get the result :34 ?