xptr

package
v0.25.15 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

README

GoKit - xptr

Pointer kits for Golang development.

Installation

go get -u github.com/likexian/gokit

Importing

import (
    "github.com/likexian/gokit/xptr"
)

Documentation

Visit the docs on GoDoc

Example

Get pointer of int
fmt.Println("&int:", xptr.Int(1))
Get pointer of string
fmt.Println("&string:", xptr.String("test"))

License

Copyright 2012-2024 Li Kexian

Licensed under the Apache License 2.0

Donation

If this project is helpful, please share it with friends.

If you want to thank me, you can give me a cup of coffee.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Author

func Author() string

Author returns package author

func Bool

func Bool(v bool) *bool

Bool converts an bool to a pointer

func Byte

func Byte(v byte) *byte

Byte converts an byte to a pointer

func Float32

func Float32(v float32) *float32

Float32 converts an float32 to a pointer

func Float64

func Float64(v float64) *float64

Float64 converts an float64 to a pointer

func Int

func Int(v int) *int

Int converts an int to a pointer

func Int16

func Int16(v int16) *int16

Int16 converts an int16 to a pointer

func Int32

func Int32(v int32) *int32

Int32 converts an int32 to a pointer

func Int64

func Int64(v int64) *int64

Int64 converts an int64 to a pointer

func Int8

func Int8(v int8) *int8

Int8 converts an int8 to a pointer

func License

func License() string

License returns package license

func Rune

func Rune(v rune) *rune

Rune converts an rune to a pointer

func String

func String(v string) *string

String converts an string to a pointer

func Uint

func Uint(v uint) *uint

Uint converts an uint to a pointer

func Uint16

func Uint16(v uint16) *uint16

Uint16 converts an uint16 to a pointer

func Uint32

func Uint32(v uint32) *uint32

Uint32 converts an uint32 to a pointer

func Uint64

func Uint64(v uint64) *uint64

Uint64 converts an uint64 to a pointer

func Uint8

func Uint8(v uint8) *uint8

Uint8 converts an uint8 to a pointer

func Version

func Version() string

Version returns package version

Types

This section is empty.

Jump to

Keyboard shortcuts

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