Skip to content
  • Dave Collins's avatar
    Add support for limited mode without unsafe pkg. · 2df17480
    Dave Collins authored
    This commit adds support for compiling spew without the unsafe package.
    When compiled without the unsafe package, some of the more advanced
    features such as invoking stringers on pointers from non-pointer
    variables and unexported struct fields are not available.
    
    By default, spew will be compiled in the limited mode for Google App
    Engine since the unsafe package is not available there.  Additionally,
    spew can be compiled without the unsafe package manually by specifying
    the "disableunsafe" build tag.
    
    Finally, a new package-level constant named "UnsafeDisabled" has been
    exposed which can be used to programmatically determine if spew was
    compiled with access to the unsafe package.
    2df17480