ptrx

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 0 Imported by: 4

Documentation

Overview

Example
package main

import (
	"fmt"
	"time"

	"github.com/xoctopus/x/ptrx"
)

func main() {
	fmt.Println(*ptrx.Ptr(10))
	fmt.Println(*ptrx.Ptr(uint64(10)))
	fmt.Println(*ptrx.Ptr("abc"))
	fmt.Println(ptrx.Ptr(time.Second))
	fmt.Println(ptrx.Ptr(time.Hour))

}
Output:

10
10
abc
1s
1h0m0s

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ptr

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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