Skip to content

deprecated-api-usage

Default severity: warning

Go documentation can mark packages, functions, methods, fields, variables, constants, and types with a Deprecated: paragraph. This check reads those markers from loaded dependencies and reports resolved uses from other packages, including deprecated struct fields.

Standard-library deprecations are reported only when the module targets the running Go language version or newer, avoiding recommendations based on API documentation newer than an older module’s target.

value, err := ioutil.ReadAll(reader)
value, err := io.ReadAll(reader)