// PurgeFuncBodies returns a copy of src in which the contents of each // outermost {...} region except struct and interface types have been // deleted. This reduces the amount of work required to parse the // top-level declarations. // // PurgeFuncBodies does not preserve newlines or position information. // Also, if the input is invalid, parsing the output of // PurgeFuncBodies may result in a different tree due to its effects // on parser error recovery. func PurgeFuncBodies(src []byte) []byte { … }