bacotell_util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: GPL-3.0 Imports: 1 Imported by: 1

Documentation

Overview

Package bacotell_util provides utilities for plugins and BacoTell.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NilablePtr added in v0.1.1

func NilablePtr[K comparable, V any, T nilable[K, V]](v T) *T

NilablePtr returns a pointer to the argument if it is not nil else a nil pointer.

func NilableVal added in v0.1.1

func NilableVal[K comparable, V any, T nilable[K, V]](v *T) T

NilableVal returns the value pointed to by the argument if it is not nil else nil.

func Ptr

func Ptr[T any](v T) *T

Ptr returns a pointer to the argument.

func PtrConv

func PtrConv[T number, R number](v *T) *R

PtrConv converts a pointer of type T to a pointer of type R. It returns a pointer to the converted value. If the input pointer is nil, it returns nil.

func Val added in v0.1.1

func Val[T any](v *T) T

Val returns the value pointed to by the argument.

Types

This section is empty.

Jump to

Keyboard shortcuts

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