When copying the example code from the README, gopls issues a deprecation warning, because parser.Parseis deprecated.
This PR updates the README to use parser.ParseCtx instead, as it is suggested by the deprecation warning. It uses context.Background(), as it is used in parser.Parse() as well to make sure that the behaviour stays identical.
When copying the example code from the README,
gopls
issues a deprecation warning, becauseparser.Parse
is deprecated.This PR updates the README to use
parser.ParseCtx
instead, as it is suggested by the deprecation warning. It usescontext.Background()
, as it is used inparser.Parse()
as well to make sure that the behaviour stays identical.