Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get() *fieldContainer
Get selects an arbitrary item from the field Pool, removes it from the field Pool, and returns it to the caller. Get may choose to ignore the field pool and treat it as empty. Callers should not assume any relation between values passed to Put and the values returned by Get.
NOTE: This function should be call Put to give back. NOTE: You should know `sync.Pool` work principle ```go
fc := logger.Get() defer logger.Put(fc) fc.Fields = append(fc.Fields, logger.String("k1", "v1")) ... use fc.Fields
```
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.