utils

package
v0.0.0-...-252d4e6 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(data bool) *bool

Bool creates reference from given data value.

func BoolUnref

func BoolUnref(b *bool) bool

BoolUnref returns false if argument is nil, otherwise it returns bool value.

func Float64

func Float64(data float64) *float64

Float64 creates reference from given data value.

func Int

func Int(data int) *int

Int creates reference from given data value.

func Int64

func Int64(data int64) *int64

Int64 creates reference from given data value.

func IntToHex

func IntToHex(num int64) []byte

IntToHex converts an int64 to a byte array

func IntUnref

func IntUnref(i *int) int

IntUnref returns int pointer referenced value, in case pointer is nil, it returns default int value 0.

func PrintJSON

func PrintJSON(data interface{}) string

PrintJSON marshals value to json and returns result. If error occurs it is being skipped.

func String

func String(data string) *string

String returns string pointer

func StringUnref

func StringUnref(s *string) string

StringUnref returns empty string if argument is nil, otherwise it returns string value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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