ptr

package
v1.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

README

ptr

import "code.byted.org/epscp/common/ptr"

Package ptr ...

Index

func Of

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

Of returns pointer to value.

func To

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

To returns the value of the pointer passed in or the default value if the pointer is nil.

func ToDef

func ToDef[T any](v *T, def T) T

ToDef returns the value of the int pointer passed in or default value if the pointer is nil.

Generated by gomarkdoc

Documentation

Overview

Package ptr ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Of

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

Of returns pointer to value.

func To

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

To returns the value of the pointer passed in or the default value if the pointer is nil.

func ToDef

func ToDef[T any](v *T, def T) T

ToDef returns the value of the int pointer passed in or default value if the pointer is nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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