package main
import ( "fmt")
type list []string
func (l *list) add(s string) { fmt.Println(">",l) newL := make(list, len(*l)+1) for i, v := range *l { newL[i] = v } newL[len(newL)-1] = s
l = &newL fmt.Println("<",l)}
func (l list) add2(s string) { fmt.Println(">",l) l = append(l, s) fmt.Println("<",l)}
func main() { fmt.Println("Hello, 世界")
var l list fmt.Println(l) l.add("1") l.add2("2") fmt.Println(l)}
Hello, 世界[]> &[]< &[1]> []< [2][]
--
--
官网: http://golang-china.org/
IRC: irc.freenode.net #golang-china
@golangchina
---
您收到此邮件是因为您订阅了Google网上论坛上的“Golang-China”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到golang-china...@googlegroups.com。
要在网络上查看此讨论,请访问https://groups.google.com/d/msgid/golang-china/0874a3fc-96c6-44c1-8b7f-866dce19780e%40googlegroups.com。
要查看更多选项,请访问https://groups.google.com/d/optout。
歪楼请问:现在有什么好的科学上网神器
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到golang-china+unsubscribe@googlegroups.com。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到golang-china...@googlegroups.com。
要在网络上查看此讨论,请访问https://groups.google.com/d/msgid/golang-china/8934106e-ecea-4059-960d-c7fe0aae4ddb%40googlegroups.com。
要查看更多选项,请访问https://groups.google.com/d/optout。
客户端是这个,但是大多数 ip 都被封掉了。
歪楼请问:现在有什么好的科学上网神器
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到golang-china...@googlegroups.com。
--
--
官网: http://golang-china.org/
IRC: irc.freenode.net #golang-china
@golangchina
---
您收到此邮件是因为您订阅了Google网上论坛上的“Golang-China”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到golang-china...@googlegroups.com。
要在网络上查看此讨论,请访问https://groups.google.com/d/msgid/golang-china/8934106e-ecea-4059-960d-c7fe0aae4ddb%40googlegroups.com。
要查看更多选项,请访问https://groups.google.com/d/optout。
--
--
官网: http://golang-china.org/
IRC: irc.freenode.net #golang-china
@golangchina
---
您收到此邮件是因为您订阅了Google网上论坛上的“Golang-China”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到golang-china...@googlegroups.com。