mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-24 09:20:31 +00:00
4df9c8d6a5
* github.com/russross/meddler v1.0.0 -> v1.0.1 * github.com/gin-gonic/gin v1.6.3 -> v1.7.4 * github.com/go-sql-driver/mysql v1.5.0 -> v1.6.0 * github.com/sirupsen/logrus v1.6.0 -> v1.8.1 * github.com/rs/zerolog v1.18.0 -> v1.25.0
39 lines
680 B
Go
39 lines
680 B
Go
// +build !binary_log
|
|
|
|
package zerolog
|
|
|
|
// encoder_json.go file contains bindings to generate
|
|
// JSON encoded byte stream.
|
|
|
|
import (
|
|
"github.com/rs/zerolog/internal/json"
|
|
)
|
|
|
|
var (
|
|
_ encoder = (*json.Encoder)(nil)
|
|
|
|
enc = json.Encoder{}
|
|
)
|
|
|
|
func init() {
|
|
// using closure to reflect the changes at runtime.
|
|
json.JSONMarshalFunc = func(v interface{}) ([]byte, error) {
|
|
return InterfaceMarshalFunc(v)
|
|
}
|
|
}
|
|
|
|
func appendJSON(dst []byte, j []byte) []byte {
|
|
return append(dst, j...)
|
|
}
|
|
|
|
func decodeIfBinaryToString(in []byte) string {
|
|
return string(in)
|
|
}
|
|
|
|
func decodeObjectToStr(in []byte) string {
|
|
return string(in)
|
|
}
|
|
|
|
func decodeIfBinaryToBytes(in []byte) []byte {
|
|
return in
|
|
}
|