mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-04 07:36:29 +00:00
75513575be
* store dependency's in git * since we vendor ... rm tech-depts * aad make target 'vendor' to update vendor folder (manual task)
35 lines
773 B
Go
35 lines
773 B
Go
// +build binary_log
|
|
|
|
package zerolog
|
|
|
|
// This file contains bindings to do binary encoding.
|
|
|
|
import (
|
|
"github.com/rs/zerolog/internal/cbor"
|
|
)
|
|
|
|
var (
|
|
_ encoder = (*cbor.Encoder)(nil)
|
|
|
|
enc = cbor.Encoder{}
|
|
)
|
|
|
|
func appendJSON(dst []byte, j []byte) []byte {
|
|
return cbor.AppendEmbeddedJSON(dst, j)
|
|
}
|
|
|
|
// decodeIfBinaryToString - converts a binary formatted log msg to a
|
|
// JSON formatted String Log message.
|
|
func decodeIfBinaryToString(in []byte) string {
|
|
return cbor.DecodeIfBinaryToString(in)
|
|
}
|
|
|
|
func decodeObjectToStr(in []byte) string {
|
|
return cbor.DecodeObjectToStr(in)
|
|
}
|
|
|
|
// decodeIfBinaryToBytes - converts a binary formatted log msg to a
|
|
// JSON formatted Bytes Log message.
|
|
func decodeIfBinaryToBytes(in []byte) []byte {
|
|
return cbor.DecodeIfBinaryToBytes(in)
|
|
}
|