dgryski.semgrep-go.writestring.use-writer-not-writestring

profile photo of dgryskidgryski
Author
581
Download Count*
License

use $W.Write($VAR) instead of io.WriteString when $VAR is []byte

Run Locally

Run in CI

Defintion

rules:
  - id: use-writer-not-writestring
    patterns:
      - pattern: io.WriteString($W, string($VAR))
    message: use $W.Write($VAR) instead of io.WriteString when $VAR is []byte
    languages:
      - go
    severity: ERROR
    metadata:
      license: MIT