-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy patharray_long.go
More file actions
54 lines (47 loc) · 1.86 KB
/
Copy patharray_long.go
File metadata and controls
54 lines (47 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Code generated by github.com/actgardner/gogen-avro/v7. DO NOT EDIT.
/*
* SOURCE:
* record.avsc
*/
package dtsavro
import (
"io"
"github.com/actgardner/gogen-avro/v7/vm"
"github.com/actgardner/gogen-avro/v7/vm/types"
)
func writeArrayLong(r []int64, w io.Writer) error {
err := vm.WriteLong(int64(len(r)), w)
if err != nil || len(r) == 0 {
return err
}
for _, e := range r {
err = vm.WriteLong(e, w)
if err != nil {
return err
}
}
return vm.WriteLong(0, w)
}
type ArrayLongWrapper struct {
Target *[]int64
}
func (_ *ArrayLongWrapper) SetBoolean(v bool) { panic("Unsupported operation") }
func (_ *ArrayLongWrapper) SetInt(v int32) { panic("Unsupported operation") }
func (_ *ArrayLongWrapper) SetLong(v int64) { panic("Unsupported operation") }
func (_ *ArrayLongWrapper) SetFloat(v float32) { panic("Unsupported operation") }
func (_ *ArrayLongWrapper) SetDouble(v float64) { panic("Unsupported operation") }
func (_ *ArrayLongWrapper) SetBytes(v []byte) { panic("Unsupported operation") }
func (_ *ArrayLongWrapper) SetString(v string) { panic("Unsupported operation") }
func (_ *ArrayLongWrapper) SetUnionElem(v int64) { panic("Unsupported operation") }
func (_ *ArrayLongWrapper) Get(i int) types.Field { panic("Unsupported operation") }
func (_ *ArrayLongWrapper) AppendMap(key string) types.Field { panic("Unsupported operation") }
func (_ *ArrayLongWrapper) Finalize() {}
func (_ *ArrayLongWrapper) SetDefault(i int) { panic("Unsupported operation") }
func (r *ArrayLongWrapper) NullField(i int) {
panic("Unsupported operation")
}
func (r *ArrayLongWrapper) AppendArray() types.Field {
var v int64
*r.Target = append(*r.Target, v)
return &types.Long{Target: &(*r.Target)[len(*r.Target)-1]}
}