• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

GannettDigital / jstransform / 17108478813

20 Aug 2025 07:35PM UTC coverage: 33.717% (-3.4%) from 37.122%
17108478813

Pull #154

github

gannett-ggreer
Use "omitzero" for non-slice/non-pointer structure levels.

"omitempty" never did anything for those types anyway.
Pull Request #154: APIS-8302 - Use "omitzero" for non-slice/non-pointer structure levels.

11 of 23 new or added lines in 8 files covered. (47.83%)

1286 existing lines in 58 files now uncovered.

4833 of 14334 relevant lines covered (33.72%)

25.91 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/generate/avro_test_data/avro/complex/url_record.go
1
// Code generated by github.com/actgardner/gogen-avro. DO NOT EDIT.
2
package complex
3

4
import (
5
        "github.com/actgardner/gogen-avro/v7/compiler"
6
        "github.com/actgardner/gogen-avro/v7/vm"
7
        "github.com/actgardner/gogen-avro/v7/vm/types"
8
        "io"
9
)
10

11
type URL_record struct {
12
        Absolute string `json:"absolute"`
13

14
        Meta *Meta_record `json:"meta"`
15

16
        Publish string `json:"publish"`
17
}
18

19
const URL_recordAvroCRC64Fingerprint = "\xc92=\x82>\x9e\v\xa4"
20

UNCOV
21
func NewURL_record() *URL_record {
×
UNCOV
22
        return &URL_record{}
×
UNCOV
23
}
×
24

25
func DeserializeURL_record(r io.Reader) (*URL_record, error) {
×
26
        t := NewURL_record()
×
27
        deser, err := compiler.CompileSchemaBytes([]byte(t.Schema()), []byte(t.Schema()))
×
28
        if err != nil {
×
29
                return nil, err
×
30
        }
×
31

32
        err = vm.Eval(r, deser, t)
×
33
        if err != nil {
×
34
                return nil, err
×
35
        }
×
36
        return t, err
×
37
}
38

39
func DeserializeURL_recordFromSchema(r io.Reader, schema string) (*URL_record, error) {
×
40
        t := NewURL_record()
×
41

×
42
        deser, err := compiler.CompileSchemaBytes([]byte(schema), []byte(t.Schema()))
×
43
        if err != nil {
×
44
                return nil, err
×
45
        }
×
46

47
        err = vm.Eval(r, deser, t)
×
48
        if err != nil {
×
49
                return nil, err
×
50
        }
×
51
        return t, err
×
52
}
53

UNCOV
54
func writeURL_record(r *URL_record, w io.Writer) error {
×
UNCOV
55
        var err error
×
UNCOV
56
        err = vm.WriteString(r.Absolute, w)
×
UNCOV
57
        if err != nil {
×
58
                return err
×
59
        }
×
NEW
60
        err = writeMeta_record(r.Meta, w)
×
UNCOV
61
        if err != nil {
×
62
                return err
×
63
        }
×
UNCOV
64
        err = vm.WriteString(r.Publish, w)
×
UNCOV
65
        if err != nil {
×
66
                return err
×
67
        }
×
UNCOV
68
        return err
×
69
}
70

71
func (r *URL_record) Serialize(w io.Writer) error {
×
72
        return writeURL_record(r, w)
×
73
}
×
74

75
func (r *URL_record) Schema() string {
×
NEW
76
        return "{\"fields\":[{\"name\":\"absolute\",\"namespace\":\"URL\",\"type\":\"string\"},{\"name\":\"meta\",\"namespace\":\"URL\",\"type\":{\"fields\":[{\"name\":\"description\",\"namespace\":\"URL.meta\",\"type\":\"string\"},{\"name\":\"siteName\",\"namespace\":\"URL.meta\",\"type\":\"string\"}],\"name\":\"meta_record\",\"namespace\":\"URL.meta\",\"type\":\"record\"}},{\"name\":\"publish\",\"namespace\":\"URL\",\"type\":\"string\"}],\"name\":\"URL.URL_record\",\"type\":\"record\"}"
×
77
}
×
78

79
func (r *URL_record) SchemaName() string {
×
80
        return "URL.URL_record"
×
81
}
×
82

83
func (_ *URL_record) SetBoolean(v bool)    { panic("Unsupported operation") }
×
84
func (_ *URL_record) SetInt(v int32)       { panic("Unsupported operation") }
×
85
func (_ *URL_record) SetLong(v int64)      { panic("Unsupported operation") }
×
86
func (_ *URL_record) SetFloat(v float32)   { panic("Unsupported operation") }
×
87
func (_ *URL_record) SetDouble(v float64)  { panic("Unsupported operation") }
×
88
func (_ *URL_record) SetBytes(v []byte)    { panic("Unsupported operation") }
×
89
func (_ *URL_record) SetString(v string)   { panic("Unsupported operation") }
×
90
func (_ *URL_record) SetUnionElem(v int64) { panic("Unsupported operation") }
×
91

UNCOV
92
func (r *URL_record) Get(i int) types.Field {
×
UNCOV
93
        switch i {
×
UNCOV
94
        case 0:
×
UNCOV
95
                return &types.String{Target: &r.Absolute}
×
UNCOV
96
        case 1:
×
NEW
97
                r.Meta = NewMeta_record()
×
UNCOV
98

×
UNCOV
99
                return r.Meta
×
UNCOV
100
        case 2:
×
UNCOV
101
                return &types.String{Target: &r.Publish}
×
102
        }
103
        panic("Unknown field index")
×
104
}
105

106
func (r *URL_record) SetDefault(i int) {
×
107
        switch i {
×
108
        }
109
        panic("Unknown field index")
×
110
}
111

UNCOV
112
func (r *URL_record) NullField(i int) {
×
UNCOV
113
        switch i {
×
114
        }
UNCOV
115
        panic("Not a nullable field index")
×
116
}
117

118
func (_ *URL_record) AppendMap(key string) types.Field { panic("Unsupported operation") }
×
119
func (_ *URL_record) AppendArray() types.Field         { panic("Unsupported operation") }
×
UNCOV
120
func (_ *URL_record) Finalize()                        {}
×
121

122
func (_ *URL_record) AvroCRC64Fingerprint() []byte {
×
123
        return []byte(URL_recordAvroCRC64Fingerprint)
×
124
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc