tutils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneFromType

func CloneFromType(typ reflect.Type) interface{}

CloneFromType returns a new zeroed type of the given type value CONTRACT: typ must be returned from reflect.Value.Type().Elem()

func CloneFromValue

func CloneFromValue(x interface{}) interface{}

CloneFromValue clones an arbitrary type and returns a new zeroed type of the instance, IT DOES NOT COPY THE CONTENTS. CONTRACT: must be a pointer

func GetPtrType

func GetPtrType(ptr interface{}) reflect.Type

GetPtrType returns the pointer type CONTRACT: ptr must be a pointer

Types

This section is empty.

Jump to

Keyboard shortcuts

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