Skip to content

argument should be pointer-like to avoid allocations (SA6002) #98

@vbanos

Description

@vbanos

I check the code using https://staticcheck.dev/ and I get the following warning:

pkg/spooledtempfile/spooled.go:212:20: argument should be pointer-like to avoid allocations (SA6002)
pkg/spooledtempfile/spooled.go:240:20: argument should be pointer-like to avoid allocations (SA6002)
pkg/spooledtempfile/spooled.go:258:20: argument should be pointer-like to avoid allocations (SA6002)

https://staticcheck.dev/docs/checks/#SA6002

All warnings are about the same code: spooledPool.Put(s.buf[:0])

Since spooledtempfile is a critical library, we should fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions