2018-12-27 20:37:47 -08:00
|
|
|
package args
|
2018-12-17 20:52:26 -08:00
|
|
|
|
2019-01-13 10:12:52 -08:00
|
|
|
// Struct is a struct containing various datatypes, to help demonstrate struct field access.
|
2018-12-17 20:52:26 -08:00
|
|
|
type Struct struct {
|
|
|
|
|
Byte byte
|
2018-12-17 23:28:31 -08:00
|
|
|
Int8 int8
|
|
|
|
|
Uint16 uint16
|
|
|
|
|
Int32 int32
|
2018-12-17 20:52:26 -08:00
|
|
|
Uint64 uint64
|
|
|
|
|
Float32 float32
|
|
|
|
|
Float64 float64
|
|
|
|
|
String string
|
|
|
|
|
Slice []Sub
|
|
|
|
|
Array [5]Sub
|
|
|
|
|
Complex64 complex64
|
|
|
|
|
Complex128 complex128
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-13 10:12:52 -08:00
|
|
|
// Sub is a sub-struct of Struct, to demonstrate nested datastructure accesses.
|
2018-12-17 20:52:26 -08:00
|
|
|
type Sub struct {
|
|
|
|
|
A uint64
|
|
|
|
|
B [3]byte
|
|
|
|
|
C uint16
|
|
|
|
|
}
|