Movatterモバイル変換


[0]ホーム

URL:


ptr

package
v2.23.1Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License:AGPL-3.0Imports:1Imported by:1

Details

Repository

github.com/coder/coder

Links

Documentation

Overview

Package ptr contains some utility methods related to pointers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcNilOrEmpty

func NilOrEmpty(s *string)bool

NilOrEmpty returns true if s is nil or the empty string.

funcNilOrZero

func NilOrZero[T number](v *T)bool

NilOrZero returns true if v is nil or 0.

funcNilToDefault

func NilToDefault[Tany](s *T, def T) T

NilToDefault coalesces a nil value to the provided default value.

funcNilToEmpty

func NilToEmpty[Tany](s *T) T

NilToEmpty coalesces a nil value to the empty value.

funcRef

func Ref[Tany](v T) *T

Ref returns a reference to v.

Types

This section is empty.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp