15 lines
262 B
Go
15 lines
262 B
Go
|
package json
|
|||
|
|
|||
|
// Slice est un tableau d’objets JSON.
|
|||
|
type Slice []Json
|
|||
|
|
|||
|
func (sl *Slice) Add(objects ...Json) Slice {
|
|||
|
*sl = append(*sl, objects...)
|
|||
|
return *sl
|
|||
|
}
|
|||
|
|
|||
|
func (sl *Slice) Insert(objects ...Json) Slice {
|
|||
|
*sl = append(objects, (*sl)...)
|
|||
|
return *sl
|
|||
|
}
|