toolshonnef.co/go/tools/gcsizes Index | Files

package gcsizes

import "honnef.co/go/tools/gcsizes"

Package gcsizes provides a types.Sizes implementation that adheres to the rules used by the gc compiler.

Index

Types

type Sizes

type Sizes struct {
	WordSize int64
	MaxAlign int64
}

func ForArch

func ForArch(arch string) *Sizes

ForArch returns a correct Sizes for the given architecture.

func (*Sizes) Alignof

func (s *Sizes) Alignof(T types.Type) int64

func (*Sizes) Offsetsof

func (s *Sizes) Offsetsof(fields []*types.Var) []int64

func (*Sizes) Sizeof

func (s *Sizes) Sizeof(T types.Type) int64

Source Files

sizes.go

Version
v0.0.1-2020.1.5
Published
Jul 30, 2020
Platform
windows/amd64
Imports
2 packages
Last checked
6 minutes ago

Tools for package owners.