This article is first published in the medium MPP plan. If you are a medium user, please follow me in medium. Thank you very much.

Go1.22 a new math lib

The inaugural v2 version of the standard library in Go, hails from the esteemed math/rand/v2 repository. It is set to make its grand debut with the official release of Go1.22, poised to serve as a reliable and production-ready resource.

Read more »

This article is first published in the medium MPP plan. If you are a medium user, please follow me in medium. Thank you very much.

In the previous article, we used defer to recover from panics. In the practical work of a gopher, defer acts like a loyal and reliable teammate, silently helping us with the clean-up work behind the scenes. For example:

Read more »

博客, 是我的知识循环系统中的最后一环,也是最重要的一环,它承担我的输出,以及个人品牌。本篇文章,我介绍一下我的博客,是怎么搭建的。

Read more »

unsafe.Pointer

再上一篇文章中,我们已经对比了Go 语言中的三种指针的区别, 您可以先去看一下这篇文章。
现在我们总结一下三种指针的区别。

  • 普通指针。不支持指针运算,保存地址以及类型信息,指向数据不会被gc回收。
  • unsafe.Pointer。不支持指针运算,保存地址但不保存类型信息,指向数据不会被gc回收。
  • uintptr。支持地址运算,保存地址但不保存类型信息,指向数据会被gc回收。
Read more »
0%