unsafe2

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package unsafe2 provides helpers to generate recursive struct types.

Index

Constants

This section is empty.

Variables

View Source
var DummyType = reflect.TypeOf(dummy{})

DummyType represents a stand-in for a recursive type.

Functions

func SetFieldType

func SetFieldType(s reflect.Type, idx int, t reflect.Type)

SetFieldType sets the type of the struct field at the given index, to the given type.

The struct type must have been created at runtime. This is very unsafe.

Types

This section is empty.

Jump to

Keyboard shortcuts

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