vendor: update buildkit to master@31c870e82a48

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2023-05-15 18:32:31 +01:00
parent 167cd16acb
commit e61a8cf637
269 changed files with 25798 additions and 3371 deletions

View File

@ -0,0 +1,30 @@
package json
import (
"bytes"
)
// Encoder is JSON encoder that supports construction of JSON values
// using methods.
type Encoder struct {
w *bytes.Buffer
Value
}
// NewEncoder returns a new JSON encoder
func NewEncoder() *Encoder {
writer := bytes.NewBuffer(nil)
scratch := make([]byte, 64)
return &Encoder{w: writer, Value: newValue(writer, &scratch)}
}
// String returns the String output of the JSON encoder
func (e Encoder) String() string {
return e.w.String()
}
// Bytes returns the []byte slice of the JSON encoder
func (e Encoder) Bytes() []byte {
return e.w.Bytes()
}