mirror of
https://github.com/hanzoai/traces.git
synced 2026-10-30 18:20:41 +00:00
* Update prometheus/prometheus dependency and remove unnecessary replace directives I need a recent version of github.com/prometheus/prometheus for an upcoming metrics-generator PR. I replaced the version with v1.8.2-0.20220228151929-e25a59925555, this corresponds with [the latest release candidate](https://github.com/prometheus/prometheus/releases/tag/v2.34.0-rc.0). I noticed some of our replace directives are fairly old, so I've been deleting them until the build broke, not sure if there is a better way to do this 🤷 * Update go.mod in tempo-serverless as well * Lint: replace grpc.WithInsecure
22 lines
353 B
Go
22 lines
353 B
Go
//go:build !appengine
|
|
// +build !appengine
|
|
|
|
package internal
|
|
|
|
import "unsafe"
|
|
|
|
// String converts byte slice to string.
|
|
func String(b []byte) string {
|
|
return *(*string)(unsafe.Pointer(&b))
|
|
}
|
|
|
|
// Bytes converts string to byte slice.
|
|
func Bytes(s string) []byte {
|
|
return *(*[]byte)(unsafe.Pointer(
|
|
&struct {
|
|
string
|
|
Cap int
|
|
}{s, len(s)},
|
|
))
|
|
}
|