Go unit test 13

Brief introduction: unit test, Go test What is recorded here is my unskilled grammar and knowledge Details step by step: Li Wenzhou's blog (very detailed) https://www.liwenzhou.com/posts/Go/16_test/#autoid-0-0-0 (there was no function test at that time, so I copied it. Hey, hey, hey) #Test function In a SPList The function to be tested is writt ...

Added by cerebrus189 on Tue, 08 Feb 2022 15:51:28 +0200

Resolve the memory layout of struct

Resolve the memory layout of struct In normal development process, we often use map[string]struct {} to implement a Set. The reason for using struct {} is that struct {} does not occupy memory space. Why does an empty struct not occupy memory space? What is the memory footprint for a custom struct? Size of struct Struct is like an object in jav ...

Added by AMCH on Sat, 08 Jan 2022 20:03:05 +0200