preflect

package
v0.4.171 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: ISC Imports: 4 Imported by: 0

Documentation

Overview

Package preflect obtains underlying type using reflection

Index

Constants

View Source
const (
	Nil = "nil"
)

Variables

This section is empty.

Functions

func IntValue

func IntValue(value any) (u64 uint64, i64 int64, hasValue, isSigned, isPointer bool)

IntValue returns the integer value of value

  • hasValue is true and u64 is initialized for any integer, pointer or nil
  • for signed integer types, isSigned is true and i64 has value
  • isPointer indicates that u64 holds a pointer value
  • nil returns: u64 = 0, hasValue true, isPointer true, isSigned false
  • superseded by non-reflection version github.com/haraldrudell/parl/ints.IntProperties

func PredeclaredType

func PredeclaredType(value any) (s string)

PredeclaredType returns a string describing the underlying type of value

  • examples: "bool" "uint8" "int(64)"
  • no named types or type aliases

Types

This section is empty.

Jump to

Keyboard shortcuts

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