10 examples of 'golang append' in Go

Every line of 'golang append' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Go code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
228func (a Int64) Append(args []interface{}) []interface{} {
229 if a.Valid {
230 return append(args, a.Int64)
231 }
232 return append(args, nil)
233}
228func (a Float64) Append(args []interface{}) []interface{} {
229 if a.Valid {
230 return append(args, a.Float64)
231 }
232 return append(args, nil)
233}
45func (e *Encoder) Append(buf []byte) {
46 e.buffer = append(e.buffer, buf[:]...)
47}
40func (self *MemColumnBuffer) Append(vals ...interface{}) {
41 self.Vals = append(self.Vals, vals...)
42}
12func (h *HashCacher) Append(vals ...[]byte) {
13
14 for _, x := range vals {
15 h.Cache = append(h.Cache, x...)
16 }
17}
156func (b *PrestoThriftBigint) Append(v interface{}) int {
157 const size = 2 + 8
158 if v == nil {
159 b.Nulls = append(b.Nulls, true)
160 b.Longs = append(b.Longs, 0)
161 return size
162 }
163
164 b.Nulls = append(b.Nulls, false)
165 b.Longs = append(b.Longs, v.(int64))
166 return size
167}
42func (r *ResourceContexts) Append(values ...ResourceContext) {
43 for _, rc := range values {
44 exists := false
45 for _, v := range *r {
46 if v.Zone == rc.Zone && v.ID == rc.ID {
47 exists = true
48 break
49 }
50 }
51 if !exists {
52 *r = append(*r, rc)
53 }
54 }
55}
3716func (o ListUint16Option) Append(values ...uint16) ListUint16Option {
3717 results := o
3718 for _, val := range values {
3719 results = append(results, NewUint16Option(val))
3720 }
3721 return results
3722}
1386func (o ListFloat32Option) Append(values ...float32) ListFloat32Option {
1387 results := o
1388 for _, val := range values {
1389 results = append(results, NewFloat32Option(val))
1390 }
1391 return results
1392}
4182func (o ListUint64Option) Append(values ...uint64) ListUint64Option {
4183 results := o
4184 for _, val := range values {
4185 results = append(results, NewUint64Option(val))
4186 }
4187 return results
4188}

Related snippets