This section is empty.


This section is empty.


func Aligned8Byte

func Aligned8Byte(fields []FieldOffset, out io.Writer) bool

    Aligned8Byte returns if all fields are aligned modulo 8-bytes.

    Error messaging is printed to out for any field determined misaligned.

    func NewTestError

    func NewTestError(s string) error


    type Env

    type Env struct {
    	Name   string
    	Value  string
    	Exists bool

    type EnvStore

    type EnvStore interface {
    	// Records the environment variable into the store.
    	Record(key string)
    	// Restore recovers the environment variables in the store.
    	Restore() error

      EnvStore stores and recovers environment variables.

      func NewEnvStore

      func NewEnvStore() EnvStore

      func SetEnvVariables

      func SetEnvVariables(env map[string]string) (EnvStore, error)

      type FieldOffset

      type FieldOffset struct {
      	// Name of the field.
      	Name string
      	// Offset of the field in bytes.
      	// To compute this at compile time use unsafe.Offsetof.
      	Offset uintptr

        FieldOffset is a preprocessor representation of a struct field alignment.

        type TestError

        type TestError string

        func (TestError) Error

        func (e TestError) Error() string