```go
package main
import "fmt"
func main() {
a2 := "12435"
//想用过这个函数过去 给他重复赋值
a(&a2)
//
// 这 a2 的值 为5 应该怎么做呢
fmt.Println(a2)
}
func a(ap interface{}) {
ap = 5
}
```
这是调用代码 感觉很不完善
```go
package manage
import (
"ask/dd"
"ask/model"
"ask/ot"
"github.com/gin-gonic/gin"
)
func NodeList(c *gin.Context) {
node_list := []model.Node{}
dd.Find(dd.FindConstructor{}, &node_list)
c.JSON(200, ot.Success(node_list, ""))
}
```
#6
更多评论
```go
package main
import (
"encoding/json"
"fmt"
)
type s struct {
}
func main() {
a2 := "12435"
a(&a2)
fmt.Println(a2)
a1_str := map[string]string{
"a":"233",
}
a1_map := map[string]string{}
a1(a1_str,&a1_map)
fmt.Println("map 值",a1_map)
}
func a1( s map[string]string,smap interface{}) {
mb, _ := json.Marshal(s)
json.Unmarshal(mb,&smap)
}
func a(ap interface{}) {
ap = 5
}
```
```hash
//运行结果
12435
map 值 map[a:233]
```
忘解惑
#1