summaryrefslogtreecommitdiff
path: root/vendor/github.com/gin-gonic/gin/internal
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/gin-gonic/gin/internal')
-rw-r--r--vendor/github.com/gin-gonic/gin/internal/bytesconv/bytesconv.go24
-rw-r--r--vendor/github.com/gin-gonic/gin/internal/json/json.go23
-rw-r--r--vendor/github.com/gin-gonic/gin/internal/json/jsoniter.go24
3 files changed, 0 insertions, 71 deletions
diff --git a/vendor/github.com/gin-gonic/gin/internal/bytesconv/bytesconv.go b/vendor/github.com/gin-gonic/gin/internal/bytesconv/bytesconv.go
deleted file mode 100644
index 86e4c4d44..000000000
--- a/vendor/github.com/gin-gonic/gin/internal/bytesconv/bytesconv.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2020 Gin Core Team. All rights reserved.
-// Use of this source code is governed by a MIT style
-// license that can be found in the LICENSE file.
-
-package bytesconv
-
-import (
- "unsafe"
-)
-
-// StringToBytes converts string to byte slice without a memory allocation.
-func StringToBytes(s string) []byte {
- return *(*[]byte)(unsafe.Pointer(
- &struct {
- string
- Cap int
- }{s, len(s)},
- ))
-}
-
-// BytesToString converts byte slice to string without a memory allocation.
-func BytesToString(b []byte) string {
- return *(*string)(unsafe.Pointer(&b))
-}
diff --git a/vendor/github.com/gin-gonic/gin/internal/json/json.go b/vendor/github.com/gin-gonic/gin/internal/json/json.go
deleted file mode 100644
index 172aeb241..000000000
--- a/vendor/github.com/gin-gonic/gin/internal/json/json.go
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2017 Bo-Yi Wu. All rights reserved.
-// Use of this source code is governed by a MIT style
-// license that can be found in the LICENSE file.
-
-//go:build !jsoniter
-// +build !jsoniter
-
-package json
-
-import "encoding/json"
-
-var (
- // Marshal is exported by gin/json package.
- Marshal = json.Marshal
- // Unmarshal is exported by gin/json package.
- Unmarshal = json.Unmarshal
- // MarshalIndent is exported by gin/json package.
- MarshalIndent = json.MarshalIndent
- // NewDecoder is exported by gin/json package.
- NewDecoder = json.NewDecoder
- // NewEncoder is exported by gin/json package.
- NewEncoder = json.NewEncoder
-)
diff --git a/vendor/github.com/gin-gonic/gin/internal/json/jsoniter.go b/vendor/github.com/gin-gonic/gin/internal/json/jsoniter.go
deleted file mode 100644
index 232f8dcad..000000000
--- a/vendor/github.com/gin-gonic/gin/internal/json/jsoniter.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2017 Bo-Yi Wu. All rights reserved.
-// Use of this source code is governed by a MIT style
-// license that can be found in the LICENSE file.
-
-//go:build jsoniter
-// +build jsoniter
-
-package json
-
-import jsoniter "github.com/json-iterator/go"
-
-var (
- json = jsoniter.ConfigCompatibleWithStandardLibrary
- // Marshal is exported by gin/json package.
- Marshal = json.Marshal
- // Unmarshal is exported by gin/json package.
- Unmarshal = json.Unmarshal
- // MarshalIndent is exported by gin/json package.
- MarshalIndent = json.MarshalIndent
- // NewDecoder is exported by gin/json package.
- NewDecoder = json.NewDecoder
- // NewEncoder is exported by gin/json package.
- NewEncoder = json.NewEncoder
-)