use
Deprecated:
(note the casing) instead of DEPRECATED:
277//
278// This includes the head block slot and root as well as information about
279// the most recent finalized and justified slots.
280// DEPRECATED: This endpoint is superseded by the /eth/v1/beacon API endpoint281func (bs *Server) GetChainHead(ctx context.Context, _ *emptypb.Empty) (*ethpb.ChainHead, error) {
282 return bs.chainHeadRetrieval(ctx)
283}
Description
Using conventional "deprecated" doc comments allows tools such as go doc
and
gopls
to mark the function as deprecated, warning the user about usage of such
deprecated functions.
Bad practice
// deprecated, use Foo instead
func DeprecatedFoo()
Recommended
// Deprecated: use Foo instead
func DeprecatedFoo()