Hacker News new | ask | show | jobs
by aleksi 4078 days ago
Go has special comments for that: "//line filename:line"
1 comments

Thanks, I didn't know that. The go/token docs don't say much about it. Do you know if there is better documentation somewhere?
I tried using this facility a few months ago based on this very short documentation but couldn't get it working, nor could I search out any further doco on it, so because it wasn't really important I gave up. Can I ask... have any of you ever successfully used this?
Yes, me. It works. :) Also it's used by "go test -cover".