DeepSource
Dashboard Resources Pricing Discover Directory Log in

Run your first analysis.

Find thousands of code security and quality issues in your codebase, before they end up in production.

Start now
All analyzers Go
Go

Go

By DeepSource

Use Analyzer
Docs
Discuss
Using regexp.Match or related in a loop SCC-SA6000
Performance

Compile parses a regular expression and returns, if successful, a Regexp object that can be used to match against text.

When matching in a loop, use regexp.Compile instead.

Multiple append can be combined into a single call CRT-P0001
Performance
Autofix

Multiple calls for append could be combined into a single call for append.

Function params involve heavy amount of copying CRT-P0003
Performance

When a param big in size (more than 80 bytes) is passed to another function, it is better to pass a pointer to the value around, rather than the value itself.

strings.Index call cause unwanted allocations CRT-P0004
Performance
Autofix

[]byte to string conversion is required when passing the arguments to strings.Index, leading to unwanted allocations. It is preferred to use calls that prevent (or minimize) such allocations (e.g., bytes.Index, etc.).

Copy of large value in range CRT-P0005
Performance
Autofix

Use pointer to slice or array, to avoid copying the value that is ranged over.