diff options
author | Corey Hulen <corey@hulen.com> | 2015-12-16 13:43:02 -0800 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-12-16 13:43:02 -0800 |
commit | 791129de2fa7db22ee2b23b97d4040c288110e97 (patch) | |
tree | 5976a456548fce8beb79014c7c2780afeea89a8a /Godeps/_workspace/src/github.com/stretchr/objx/value.go | |
parent | f08deca79f24ff1efe086483a091cf807a5a2e14 (diff) | |
parent | f54936467101bb08bbdf7f3d9c341134c06b83c3 (diff) | |
download | chat-791129de2fa7db22ee2b23b97d4040c288110e97.tar.gz chat-791129de2fa7db22ee2b23b97d4040c288110e97.tar.bz2 chat-791129de2fa7db22ee2b23b97d4040c288110e97.zip |
Merge pull request #1742 from mattermost/update-golang-deps
Updating go dependancies
Diffstat (limited to 'Godeps/_workspace/src/github.com/stretchr/objx/value.go')
-rw-r--r-- | Godeps/_workspace/src/github.com/stretchr/objx/value.go | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/Godeps/_workspace/src/github.com/stretchr/objx/value.go b/Godeps/_workspace/src/github.com/stretchr/objx/value.go deleted file mode 100644 index 956a2211d..000000000 --- a/Godeps/_workspace/src/github.com/stretchr/objx/value.go +++ /dev/null @@ -1,56 +0,0 @@ -package objx - -import ( - "fmt" - "strconv" -) - -// Value provides methods for extracting interface{} data in various -// types. -type Value struct { - // data contains the raw data being managed by this Value - data interface{} -} - -// Data returns the raw data contained by this Value -func (v *Value) Data() interface{} { - return v.data -} - -// String returns the value always as a string -func (v *Value) String() string { - switch { - case v.IsStr(): - return v.Str() - case v.IsBool(): - return strconv.FormatBool(v.Bool()) - case v.IsFloat32(): - return strconv.FormatFloat(float64(v.Float32()), 'f', -1, 32) - case v.IsFloat64(): - return strconv.FormatFloat(v.Float64(), 'f', -1, 64) - case v.IsInt(): - return strconv.FormatInt(int64(v.Int()), 10) - case v.IsInt(): - return strconv.FormatInt(int64(v.Int()), 10) - case v.IsInt8(): - return strconv.FormatInt(int64(v.Int8()), 10) - case v.IsInt16(): - return strconv.FormatInt(int64(v.Int16()), 10) - case v.IsInt32(): - return strconv.FormatInt(int64(v.Int32()), 10) - case v.IsInt64(): - return strconv.FormatInt(v.Int64(), 10) - case v.IsUint(): - return strconv.FormatUint(uint64(v.Uint()), 10) - case v.IsUint8(): - return strconv.FormatUint(uint64(v.Uint8()), 10) - case v.IsUint16(): - return strconv.FormatUint(uint64(v.Uint16()), 10) - case v.IsUint32(): - return strconv.FormatUint(uint64(v.Uint32()), 10) - case v.IsUint64(): - return strconv.FormatUint(v.Uint64(), 10) - } - - return fmt.Sprintf("%#v", v.Data()) -} |