You could, but then when you get an error, you'll see the file and line number of the assert function rather than the code that actually produced the error.
The runtime package allows you to grab the current trace, you can just pop the last frame off and print that.
True. The only other challenge is that in production software you rarely want to call panic()
As another comment mentioned you can just use build tags to make assert a no-op in release builds
Also, there is no way to eliminate the assert clause in a high-performance (release) build.