摘要: Golang关于类型设计的一些原则 变量包括(type, value)两部分 理解这一点就知道为什么nil != nil了 type 包括 static type和concrete type. 简单来说 static type是你在编码是看见的类型(如int、string),concrete typ 阅读全文
posted @ 2020-11-02 15:25 luobote11 阅读(480) 评论(0) 推荐(0)
摘要: 运行完直接结束 1 func Routine1() { 2 fmt.Println("Hello go!") 3 } 4 5 func TestRoutine1(t *testing.T) { 6 go Routine1() 7 fmt.Println("Hello world!") 8 } 等待协 阅读全文
posted @ 2020-10-18 23:19 luobote11 阅读(352) 评论(0) 推荐(0)
摘要: 参考李文周的博客搭建vscode的go开发环境 在go build 时报如下错误: exec: “gcc”: executable file not found in %PATH% 以及 sorry, unimplemented: 64-bit mode not compiled in 解决方案: 阅读全文
posted @ 2020-06-02 21:35 luobote11 阅读(177) 评论(0) 推荐(0)
摘要: 负数的按位与运算: 按位与运算是按照数据的内部二进制形式进行运算的。 若是两个负数,则是按二进制补码形式进行按位与。 所得结果若用有符号整型变量存储,则内部形式仍看作二进制补码。 如果用格式符%d输出,输出结果为十进制真值(不应该称为十进制原码)。 例如: 负数与负数: #include <stdi 阅读全文
posted @ 2020-04-29 01:06 luobote11 阅读(6859) 评论(0) 推荐(0)