ptrfrom

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package ptrfrom helps getting pointers when declaring literals in tests.

Example:

wantArtifactSpec := model.ArtifactSpec {
  Algorithm: ptrfrom.String("sha256"),
  Digest:    ptrfrom.String("asdfqwer"),
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Any added in v0.2.0

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

Any helps get pointers from any type for test literals

func Bool

func Bool(v bool) *bool

Bool helps get bool pointers for test literals

func Float64

func Float64(v float64) *float64

Float64 helps get float64 pofloaters for test literals

func Int

func Int(v int) *int

Int helps get int pointers for test literals

func Int64

func Int64(v int64) *int64

Int64 helps get int64 pointers for test literals

func String

func String(v string) *string

String helps get string pointers for test literals

func Time added in v0.1.1

func Time(v time.Time) *time.Time

Time helps get time pointers for test literals

Types

This section is empty.

Jump to

Keyboard shortcuts

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