ref

package module
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: MIT Imports: 4 Imported by: 0

README

ref

Shortcuts for pass by reference

package main

import "github.com/tada-team/ref"

type MyStruct struct {
    X *string
}

func main()  {
    print(MyStruct{X: ref.String("yyy")})
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

func Bytes

func Bytes(v []byte) *[]byte

func BytesEqual added in v1.4.0

func BytesEqual(v1, v2 *[]byte) bool

func Float32 added in v1.1.0

func Float32(v float32) *float32

func Float64 added in v1.1.0

func Float64(v float64) *float64

func Int

func Int(v int) *int

func Int16 added in v1.1.0

func Int16(v int16) *int16

func Int32 added in v1.1.0

func Int32(v int32) *int32

func Int64 added in v1.1.0

func Int64(v int64) *int64

func Int8 added in v1.1.0

func Int8(v int8) *int8

func IntEqual added in v1.3.0

func IntEqual(v1, v2 *int) bool

func MustJSON

func MustJSON(v interface{}) *[]byte

func Now

func Now() *time.Time

func String

func String(v string) *string

func StringEqual added in v1.4.0

func StringEqual(v1, v2 *string) bool

func Strings added in v1.2.0

func Strings(v []string) *[]string

func Time

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

func TimeEqual added in v1.3.0

func TimeEqual(v1, v2 *time.Time) bool

func Uint

func Uint(v uint) *uint

func Uint16 added in v1.1.0

func Uint16(v uint16) *uint16

func Uint16Equal added in v1.3.0

func Uint16Equal(v1, v2 *uint16) bool

func Uint32 added in v1.1.0

func Uint32(v uint32) *uint32

func Uint64 added in v1.1.0

func Uint64(v uint64) *uint64

func Uint8 added in v1.1.0

func Uint8(v uint8) *uint8

Types

This section is empty.

Jump to

Keyboard shortcuts

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