随笔分类 -  golang

摘要:Make the IPAddr type implement fmt.Stringer to print the address as a dotted quad. For instance, IPAddr{1, 2, 3, 4} should print as "1.2.3.4". 1 package main 2 3 import "fmt" 4 5 type IPAdd... 阅读全文
posted @ 2017-06-19 10:36 chpx 阅读(540) 评论(0) 推荐(0)
摘要:Exercise: Fibonacci closure 题目: 代码: 运行结果: 阅读全文
posted @ 2016-05-24 12:30 chpx 阅读(234) 评论(0) 推荐(0)
摘要:Exercise: Maps 题目: 代码: 结果: 阅读全文
posted @ 2016-05-24 00:28 chpx 阅读(246) 评论(0) 推荐(0)
摘要:Exercise: Slices 题目: 代码: 结果: 阅读全文
posted @ 2016-05-23 23:31 chpx 阅读(256) 评论(0) 推荐(0)
摘要:开始学golang 上手文档https://golang.org/doc/install tour:https://tour.golang.org 系统:windows10 64bit 从文档上抄一段代码,保存为hello.go 运行命令: 运行结果: 以上。 阅读全文
posted @ 2016-05-22 13:57 chpx 阅读(200) 评论(0) 推荐(0)