dgryski.semgrep-go.writestring.use-write-not-fprint

profile photo of dgryskidgryski
Author
unknown
Download Count*
License

use $W.Write($VAR) instead of fmt.Fprint when $VAR is []byte

Run Locally

Run in CI

Defintion

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