```go
package main
import (
"fmt"
"container/ring"
)
func main () {
r := ring.New(1)
r.Value = "A1"
s := string(r.Value)
fmt.Printf("%T", s[0])
}
```
不知道怎么出现这个错误:
# command-line-arguments
main/main.go:14: cannot convert r.Value (type interface {}) to type string: need type assertion
fmt.Printf("%T", r.Value) 结果是 string 啊?!
有疑问加站长微信联系(非本文作者)