From 43dac0bc4302fed79eaeb661723ca584a9c0496a Mon Sep 17 00:00:00 2001 From: HuabingZhao Date: Mon, 4 Sep 2017 15:00:54 +0800 Subject: restructure the source directory Issue-ID: OOM-61 Change-Id: Ib6f633d517ad197bfdbca59b374cdad2f1ed897e Signed-off-by: HuabingZhao --- .../github.com/ugorji/go/codec/helper_unsafe.go | 45 ---------------------- 1 file changed, 45 deletions(-) delete mode 100644 kube2msb/src/vendor/github.com/ugorji/go/codec/helper_unsafe.go (limited to 'kube2msb/src/vendor/github.com/ugorji/go/codec/helper_unsafe.go') diff --git a/kube2msb/src/vendor/github.com/ugorji/go/codec/helper_unsafe.go b/kube2msb/src/vendor/github.com/ugorji/go/codec/helper_unsafe.go deleted file mode 100644 index 373b2b1..0000000 --- a/kube2msb/src/vendor/github.com/ugorji/go/codec/helper_unsafe.go +++ /dev/null @@ -1,45 +0,0 @@ -//+build unsafe - -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. -// Use of this source code is governed by a MIT license found in the LICENSE file. - -package codec - -import ( - "unsafe" -) - -// This file has unsafe variants of some helper methods. - -type unsafeString struct { - Data uintptr - Len int -} - -type unsafeBytes struct { - Data uintptr - Len int - Cap int -} - -// stringView returns a view of the []byte as a string. -// In unsafe mode, it doesn't incur allocation and copying caused by conversion. -// In regular safe mode, it is an allocation and copy. -func stringView(v []byte) string { - if len(v) == 0 { - return "" - } - x := unsafeString{uintptr(unsafe.Pointer(&v[0])), len(v)} - return *(*string)(unsafe.Pointer(&x)) -} - -// bytesView returns a view of the string as a []byte. -// In unsafe mode, it doesn't incur allocation and copying caused by conversion. -// In regular safe mode, it is an allocation and copy. -func bytesView(v string) []byte { - if len(v) == 0 { - return zeroByteSlice - } - x := unsafeBytes{uintptr(unsafe.Pointer(&v)), len(v), len(v)} - return *(*[]byte)(unsafe.Pointer(&x)) -} -- cgit 1.2.3-korg