Deprecate a function or package in Go by adding a // Deprecated: comment immediately before the declaration. This comment must start with the word "Deprecated" followed by a space and a brief explanation of why it is deprecated and what to use instead.
// Deprecated: Use TypeReg instead.
const TypeRegA = '\x00'
// Deprecated: Use Modified instead.
var ModifiedTime uint16
The go command and documentation tools automatically detect this comment and mark the symbol as deprecated in generated documentation and API diffs.