diff options
author | Antoine GIRARD <sapk@users.noreply.github.com> | 2018-05-20 08:09:35 +0200 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2018-05-20 09:09:35 +0300 |
commit | 8dca5ad526798c6cdaea854c1c789c2ed2e9a588 (patch) | |
tree | 3390a5bd34df4a71b1855210411d4dae21d20c76 /vendor/github.com | |
parent | 81b4d38f0117441e00916dc091063eda30df28ea (diff) | |
download | gitea-8dca5ad526798c6cdaea854c1c789c2ed2e9a588.tar.gz gitea-8dca5ad526798c6cdaea854c1c789c2ed2e9a588.zip |
Fetch missing file in github.com/davecgh/go-spew/spew (#3995)
Diffstat (limited to 'vendor/github.com')
-rw-r--r-- | vendor/github.com/davecgh/go-spew/spew/bypasssafe.go | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go new file mode 100644 index 0000000000..1fe3cf3d5d --- /dev/null +++ b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go @@ -0,0 +1,38 @@ +// Copyright (c) 2015-2016 Dave Collins <dave@davec.name> +// +// Permission to use, copy, modify, and distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +// NOTE: Due to the following build constraints, this file will only be compiled +// when the code is running on Google App Engine, compiled by GopherJS, or +// "-tags safe" is added to the go build command line. The "disableunsafe" +// tag is deprecated and thus should not be used. +// +build js appengine safe disableunsafe + +package spew + +import "reflect" + +const ( + // UnsafeDisabled is a build-time constant which specifies whether or + // not access to the unsafe package is available. + UnsafeDisabled = true +) + +// unsafeReflectValue typically converts the passed reflect.Value into a one +// that bypasses the typical safety restrictions preventing access to +// unaddressable and unexported data. However, doing this relies on access to +// the unsafe package. This is a stub version which simply returns the passed +// reflect.Value when the unsafe package is not available. +func unsafeReflectValue(v reflect.Value) reflect.Value { + return v +} |