package args

import "github.com/mmcloughlin/avo/examples/args"

Package args demonstrates how to load function arguments in avo.

Index

Functions

func ArrayThree

func ArrayThree(a [7]uint64) uint64

func DereferenceFloat32

func DereferenceFloat32(s *Struct) float32

func FieldArrayOneC

func FieldArrayOneC(s Struct) uint16

func FieldArrayTwoBTwo

func FieldArrayTwoBTwo(s Struct) byte

func FieldByte

func FieldByte(s Struct) byte

func FieldComplex128Real

func FieldComplex128Real(s Struct) float64

func FieldComplex64Imag

func FieldComplex64Imag(s Struct) float32

func FieldFloat32

func FieldFloat32(s Struct) float32

func FieldFloat64

func FieldFloat64(s Struct) float64

func FieldInt32

func FieldInt32(s Struct) int32

func FieldInt8

func FieldInt8(s Struct) int8

func FieldSliceCap

func FieldSliceCap(s Struct) int

func FieldStringLen

func FieldStringLen(s Struct) int

func FieldUint16

func FieldUint16(s Struct) uint16

func FieldUint64

func FieldUint64(s Struct) uint64

func Second

func Second(x int32, y int32) int32

func SliceCap

func SliceCap(s []int) int

func SliceLen

func SliceLen(s []int) int

func StringLen

func StringLen(s string) int

Types

type Struct

type Struct struct {
	Byte       byte
	Int8       int8
	Uint16     uint16
	Int32      int32
	Uint64     uint64
	Float32    float32
	Float64    float64
	String     string
	Slice      []Sub
	Array      [5]Sub
	Complex64  complex64
	Complex128 complex128
}

Struct is a struct containing various datatypes, to help demonstrate struct field access.

type Sub

type Sub struct {
	A uint64
	B [3]byte
	C uint16
}

Sub is a sub-struct of Struct, to demonstrate nested datastructure accesses.

Source Files

args.go doc.go stub.go

Version
v0.6.0 (latest)
Published
Jan 7, 2024
Platform
linux/amd64
Last checked
1 month ago

Tools for package owners.