// sizeOfSchemaType returns the size of a schema type,
// relative to the size of a pointer in native Go.
//
// For example, TypeInt and TypeMap returns 1, but TypeList returns 3, as a
// slice in Go has a pointer and two integers for length and capacity.
// Any basic type smaller than a pointer, such as TypeBool, returns 1.
sizeOfSchemaType returns the size of a schema type,
relative to the size of a pointer in native Go.

For example, TypeInt and TypeMap returns 1, but TypeList returns 3, as a
slice in Go has a pointer and two integers for length and capacity.
Any basic type smaller than a pointer, such as TypeBool, returns 1.
// sizeOfSchemaType returns the size of a schema type // relative to the size of a pointer in native Go . // // For example TypeInt and TypeMap returns 1 but TypeList returns 3 as a // slice in Go has a pointer and two integers for length and capacity . // Any basic type smaller than a pointer such as TypeBool returns 1 .
func sizeOfSchemaType(t schema.Type) uintptr {
	kind := t.TypeKind()
	if size := sizeOfTypeKind[kind]; size > 0 {
		return size
	}
	return 100 * sizeSmallEnoughForInlining
}
func sizeOfSchemaType ( t schema . Type ) uintptr { kind := t . TypeKind ( ) if size := sizeOfTypeKind [ kind ] ; size > 0 { return size } return 100 * sizeSmallEnoughForInlining }
sizeOfSchemaType returns the size of a schema type,
relative to the size of a pointer in native Go.
sizeOfSchemaType returns the size of a schema type relative to the size of a pointer in native Go .
// If this TypeKind is represented by the basicnode package, // we statically know its size and we can return here. // TODO: handle typekinds like structs, unions, etc. // For now, return a large size to fall back to using a pointer.