diff options
| author | Dave Collins <[email protected]> | 2015-06-17 22:34:22 -0500 |
|---|---|---|
| committer | Dave Collins <[email protected]> | 2015-06-19 15:29:34 -0500 |
| commit | 2df174808ee097f90d259e432cc04442cf60be21 (patch) | |
| tree | 137a52652745f1dc47abb8ab3d379cb556e6e632 /README.md | |
| parent | f9f629a1d082960e5d1747f33c2b378612615fea (diff) | |
Add support for limited mode without unsafe pkg.
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.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -154,7 +154,10 @@ options. See the ConfigState documentation for more details. * DisablePointerMethods Disables invocation of error and Stringer interface methods on types - which only accept pointer receivers from non-pointer variables. + which only accept pointer receivers from non-pointer variables. This option + relies on access to the unsafe package, so it will not have any effect when + running in environments without access to the unsafe package such as Google + App Engine or with the "disableunsafe" build tag specified. Pointer method invocation is enabled by default. * ContinueOnMethod @@ -177,6 +180,15 @@ options. See the ConfigState documentation for more details. ``` +## Unsafe Package Dependency + +This package relies on the unsafe package to perform some of the more advanced +features, however it also supports a "limited" mode which allows it to work in +environments where the unsafe package is not available. By default, it will +operate in this mode on Google App Engine. The "disableunsafe" build tag may +also be specified to force the package to build without using the unsafe +package. + ## License Go-spew is licensed under the liberal ISC License. |
