iswbm / golangcodingtime Goto Github PK
View Code? Open in Web Editor NEWGo编程时光,一个零基础入门 Golang 的教程
Home Page: http://golang.iswbm.com
Go编程时光,一个零基础入门 Golang 的教程
Home Page: http://golang.iswbm.com
您好,请问能提供评论功能吗?
import "fmt"
多个包导入,请使用 {} 来组织
import {
"fmt"
"os"
}
应该是()
/5. 接口命名
/5. 注释规范
2.5节描述
2.5.3 空接口的坑1
坑1:空接口可以承载任意值,但不代表任意类型就可以承接空接口类型的值
我的理解是:因为空接口包含两个属性:类型和值。而任意类型只包含值,所以无法把空接口赋值给任意类型
设置 GOPATH
![image-20200419171345699](/Users/MING/Library/Application Support/typora-user-images/image-20200419171345699.png)
开启 GO MODULES,并设置代理
![image-20200419165821668](/Users/MING/Library/Application Support/typora-user-images/image-20200419165821668.png)
在 github 和博客上看不到图片
描述:rune,占用4个字节,共32位比特位,所以它和 uint32 本质上也没有区别。
实际:rune其实是int32。
而 int 没有并没有指定它的位数,说明它的大小,是可以变化的,那根据什么变化呢?
这边应该是多了一个最前面的没有
第四章 并发编程
4.3
节 详解信道/通道中,最后一段程序,确保主协程等待所有子协程采用的time.Sleep
,方法。但是方法中参数有问题,应为time.Sleep(3*time.Second)
。
// 定义容量为10的信道
var 信道实例 [10]chan 信道类型
实际是长度为10类型为“chan 信道类型”的数组
因为在defer函数定义时,对外部变量的引用是有两种方式的,分别是作为函数参数和作为闭包引用。
使用匿名函数的话是没有将参数传递过去的,在最后调用是才去拿值。
import "fmt"
func main() {
name := "go"
defer func(name string) {
fmt.Println(name) // 输出: go
}(name)
name = "python"
fmt.Println(name) // 输出: python
} // 这样输出就是python go
正在学习,过了个周末,发现web实战在目录消失了
建议加下函数教程,函数式编程,还有项目结构规范这些
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.