```go
package main
import (
"fmt"
"net"
)
func test() (int, int) {
return 2, 3
}
func main() {
a, b := test()
a, b := test()//编译报错 no new variables on left side of :=
add1 := "0.0.0.0:1234"
add2 := "0.0.0.0:4321"
server1, err := net.Listen("tcp", add1)
defer server1.Close()
server2, err := net.Listen("tcp", add2)//err 编译没报错
if err != nil {
fmt.Println(err.Error())
return
}
defer server2.Close()
}
```
**不知道什么原因**<br>
请教
有疑问加站长微信联系(非本文作者)