From 07f3b147f1619b234cad0fda3d7556c1f05e7f11 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 8 Jan 2019 13:47:51 -0500 Subject: Remove easyjson in preparation for switch to jsoniter The jsoniter library does not require code generation, which is a massive advantage over easyjson (it's also about the same in performance). Begin moving over to it by removing the existing easyjson code. Signed-off-by: Matthew Heon --- .../mailru/easyjson/jlexer/bytestostr.go | 24 ---------------------- 1 file changed, 24 deletions(-) delete mode 100644 vendor/github.com/mailru/easyjson/jlexer/bytestostr.go (limited to 'vendor/github.com/mailru/easyjson/jlexer/bytestostr.go') diff --git a/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go b/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go deleted file mode 100644 index ff7b27c5b..000000000 --- a/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go +++ /dev/null @@ -1,24 +0,0 @@ -// This file will only be included to the build if neither -// easyjson_nounsafe nor appengine build tag is set. See README notes -// for more details. - -//+build !easyjson_nounsafe -//+build !appengine - -package jlexer - -import ( - "reflect" - "unsafe" -) - -// bytesToStr creates a string pointing at the slice to avoid copying. -// -// Warning: the string returned by the function should be used with care, as the whole input data -// chunk may be either blocked from being freed by GC because of a single string or the buffer.Data -// may be garbage-collected even when the string exists. -func bytesToStr(data []byte) string { - h := (*reflect.SliceHeader)(unsafe.Pointer(&data)) - shdr := reflect.StringHeader{Data: h.Data, Len: h.Len} - return *(*string)(unsafe.Pointer(&shdr)) -} -- cgit v1.2.3-54-g00ecf