Giter Club home page Giter Club logo

golangcodingtime's Issues

错别字?

2.6 学习接口:接口的三个”潜规则”
image

3.4代码规范第7点有误

  1. 包的导入
    单行的包导入

import "fmt"
多个包导入,请使用 {} 来组织

import {
"fmt"
"os"
}

应该是()

2.5节描述

2.5节描述
2.5.3 空接口的坑1
坑1:空接口可以承载任意值,但不代表任意类型就可以承接空接口类型的值
我的理解是:因为空接口包含两个属性:类型和值。而任意类型只包含值,所以无法把空接口赋值给任意类型

5.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 和博客上看不到图片

1.4节关于rune的介绍

描述:rune,占用4个字节,共32位比特位,所以它和 uint32 本质上也没有区别。
实际:rune其实是int32。

1.3 章节语言表述

而 int 没有并没有指定它的位数,说明它的大小,是可以变化的,那根据什么变化呢?

这边应该是多了一个最前面的没有

4.3小节勘误

第四章 并发编程
4.3节 详解信道/通道中,最后一段程序,确保主协程等待所有子协程采用的time.Sleep,方法。但是方法中参数有问题,应为time.Sleep(3*time.Second)

对“1.12 流程控制:defer 延迟语句”这一章节中对“defer 后面跟的是匿名函数特殊场景进行解答”。

因为在defer函数定义时,对外部变量的引用是有两种方式的,分别是作为函数参数和作为闭包引用。
使用匿名函数的话是没有将参数传递过去的,在最后调用是才去拿值。


import "fmt"

func main() {
	name := "go"
	defer func(name string) {
		fmt.Println(name) // 输出: go
	}(name)
	name = "python"
	fmt.Println(name) // 输出: python
}  // 这样输出就是python go

发现数组这段描述容易有误解?

image
[4] int{3:1} 原文中这个描述是不是有点问题:“可以看出[4]int{3:1},4表示 数组有4个元素,3 表示 前面三个元素是 0,后面1 表示 最后一个元素是1。” 最后一个元素是1 是不是描述成index 是3对应的值为1会更为准确

建议

建议加下函数教程,函数式编程,还有项目结构规范这些

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.