summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/pborman/uuid/json.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-08-10 00:29:54 +0200
committerGitHub <noreply@github.com>2020-08-10 00:29:54 +0200
commit4e50fd864921c556988c919269448efdb90fa961 (patch)
treea3625f03f8de3c4f3841364000a4ea3aa42c1533 /vendor/github.com/pborman/uuid/json.go
parentdfdffa0027334e55ce213fc6eb62206dbf48baf6 (diff)
downloadmatterbridge-msglm-4e50fd864921c556988c919269448efdb90fa961.tar.gz
matterbridge-msglm-4e50fd864921c556988c919269448efdb90fa961.tar.bz2
matterbridge-msglm-4e50fd864921c556988c919269448efdb90fa961.zip
Use mattermost v5 module (#1192)
Diffstat (limited to 'vendor/github.com/pborman/uuid/json.go')
-rw-r--r--vendor/github.com/pborman/uuid/json.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/vendor/github.com/pborman/uuid/json.go b/vendor/github.com/pborman/uuid/json.go
deleted file mode 100644
index 9dda1dfb..00000000
--- a/vendor/github.com/pborman/uuid/json.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2014 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package uuid
-
-import "errors"
-
-func (u UUID) MarshalJSON() ([]byte, error) {
- if len(u) != 16 {
- return []byte(`""`), nil
- }
- var js [38]byte
- js[0] = '"'
- encodeHex(js[1:], u)
- js[37] = '"'
- return js[:], nil
-}
-
-func (u *UUID) UnmarshalJSON(data []byte) error {
- if string(data) == `""` {
- return nil
- }
- if data[0] != '"' {
- return errors.New("invalid UUID format")
- }
- data = data[1 : len(data)-1]
- uu := Parse(string(data))
- if uu == nil {
- return errors.New("invalid UUID format")
- }
- *u = uu
- return nil
-}