MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / decode

Function decode

pkg/tabular/tabular.go:136–140  ·  view source on GitHub ↗

decode normalizes the input to UTF-8, using the BOM (if any) to detect UTF-16; defaults to UTF-8 when no BOM is present, stripping a UTF-8 BOM.

(raw []byte)

Source from the content-addressed store, hash-verified

134// decode normalizes the input to UTF-8, using the BOM (if any) to detect
135// UTF-16; defaults to UTF-8 when no BOM is present, stripping a UTF-8 BOM.
136func decode(raw []byte) ([]byte, error) {
137 dec := unicode.BOMOverride(unicode.UTF8.NewDecoder())
138 out, _, err := transform.Bytes(dec, raw)
139 return out, err
140}
141
142// detectDelimiter inspects the header line and picks the delimiter (comma or
143// tab) that appears more often outside of quoted fields. sigcheck's comma

Callers 1

ParseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected