You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In continuation of #6511, I would like to address supporting examples as tests. Examples should be run as tests if they have a proper name and an output specified in the comment section: https://golang.org/pkg/testing/#hdr-Examples
I have a CL almost ready. Before that I would like to address one question.
My CL has a flaw which I am not sure what to do with. If some user submits a program with example and does not import "testing" package in the code then playground does it for him. Problem arises when there is some error in the code and the error highlighter points to wrong line. It happens because we have added "testing" import and then applied format.Source(). Thus sources got transformed and the playground highlights wrong line.
Should I fix this before posting a CL?
The text was updated successfully, but these errors were encountered:
In continuation of #6511, I would like to address supporting examples as tests. Examples should be run as tests if they have a proper name and an output specified in the comment section: https://golang.org/pkg/testing/#hdr-Examples
I have a CL almost ready. Before that I would like to address one question.
My CL has a flaw which I am not sure what to do with. If some user submits a program with example and does not import "testing" package in the code then playground does it for him. Problem arises when there is some error in the code and the error highlighter points to wrong line. It happens because we have added "testing" import and then applied format.Source(). Thus sources got transformed and the playground highlights wrong line.
Should I fix this before posting a CL?
The text was updated successfully, but these errors were encountered: