davecgh / go-spew

Implements a deep pretty printer for Go data structures to aid in debugging
ISC License
5.98k stars 361 forks source link

Production readiness #106

Open fifarafa opened 5 years ago

fifarafa commented 5 years ago

I've a question regarding readme excerpt:

Here is an example of how you can use spew.Sdump() to help debug a web application. Please be sure to wrap your output using the html.EscapeString() function for safety reasons. You should also only use this debugging technique in a development environment, never in production.

What does it mean, why it shouldn't be used in production? Why?

jrick commented 5 years ago

Spew requires unsafe (for all features, a safe version can be compiled with -tags safe) and memory/type safety is not guaranteed in all future Go releases. An upgrade to Go could introduce a security flaw in any application using spew.