好好爱自己!

摘要: Alignof返回的对齐数是结构体中最大元素所占的内存数,不超过8, 参考:https://studygolang.com/articles/21827 unsafe.Sizeof 和 unsafe.Offsetof 的理解 package main import ( "fmt" "unsafe" 阅读全文
posted @ 2021-04-16 15:49 立志做一个好的程序员 阅读(793) 评论(0) 推荐(0) 编辑
摘要: 原文: https://studygolang.com/articles/21827 以下讲解均在64位系统下进行 基础类型大小 typesize/bytes bool 1 intN, uintN, floatN, complexN N/8 int, uint, uintptr 1 *T 1 str 阅读全文
posted @ 2021-04-16 15:29 立志做一个好的程序员 阅读(268) 评论(0) 推荐(0) 编辑
摘要: https://www.digitalocean.com/community/tutorials/how-to-do-math-in-go-with-operators#:~:text=If%20we're%20dividing%20integers,than%20or%20equal%20to%2 阅读全文
posted @ 2021-04-16 09:41 立志做一个好的程序员 阅读(1939) 评论(0) 推荐(0) 编辑

不断学习创作,与自己快乐相处