utils

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package utils provides a set of common utilities, used thoughout the project

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToString

func BytesToString(bs []byte) string

BytesToString converts byte slice to string without copy. Only use this function when you fully understand how it works.

func GetTypeName

func GetTypeName(v interface{}) string

GetTypeName returns type's name as string

func StringToBytes

func StringToBytes(s string) []byte

StringToBytes converts string to byte slice without copy. Note the byte slice is read only and should not be modified after conversion. The lifecycle of returned bytes depends on input string. Only use this function when you fully understand how it works.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL