csv

package
v0.19.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package csv declares the error codes and the sentinels of the CSV codec, internal/service/data/codec/csv — range 0.3.8.* (ADR 0005 service/data/codec/csv block).

The codes live in the core at the path that mirrors the package emitting them (ADR 0160 §2) and keep the values they were allocated with: the LL byte 3 records the layer that allocated the range, not the directory that declares it today (ADR 0160 §3). Nothing here encodes or decodes — the mechanism, and the constructors that attach a failure's detail, stay in the service package.

Package csv — the sentinel *errs.Error values, one per code. Each Reason derives from its var name or from its Code constant (ADR 0020); the Public and Private texts are the ones the service package always emitted, so moving the declaration changed no rendering.

Index

Constants

View Source
const CodeCSVMarshalFailed errs.Code = 0x00_03_08_01 // 0.3.8.1

CodeCSVMarshalFailed identifies a failure inside encoding/csv.Writer.

View Source
const CodeCSVUnmarshalFailed errs.Code = 0x00_03_08_02 // 0.3.8.2

CodeCSVUnmarshalFailed identifies a failure inside encoding/csv.Reader.

View Source
const CodeCSVValueInvalid errs.Code = 0x00_03_08_03 // 0.3.8.3

CodeCSVValueInvalid identifies a Marshal / Unmarshal call whose target is not a *[][]string (CSV only serialises a records matrix).

Variables

View Source
var (
	// MarshalFailed wraps a failure from encoding/csv.Writer.Write(All).
	MarshalFailed = errs.Define(CodeCSVMarshalFailed, "MARSHAL_FAILED",
		"CSV encoding failed",
		"service/data/codec/csv: encoding/csv.Writer.WriteAll returned an error")

	// UnmarshalFailed wraps a failure from encoding/csv.Reader.ReadAll.
	UnmarshalFailed = errs.Define(CodeCSVUnmarshalFailed, "UNMARSHAL_FAILED",
		"CSV decoding failed",
		"service/data/codec/csv: encoding/csv.Reader.ReadAll returned an error")

	// ValueInvalid fires when the caller does not pass a *[][]string.
	ValueInvalid = errs.Define(CodeCSVValueInvalid, "VALUE_INVALID",
		"CSV codec requires a [][]string value",
		"service/data/codec/csv: Marshal/Unmarshal called with non-[][]string argument")
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL