read-tdtp

command
v1.26.5 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 5 Imported by: 0

README

read-tdtp — Чтение TDTP файла

Минимальный пример чтения и вывода содержимого TDTP файла.
Поддерживает сжатые пакеты (compression="zstd" / "kanzi").

Запуск

# Читать конкретный файл
go run main.go path/to/file.tdtp.xml

# По умолчанию ищет tdtp.xml в текущей директории
go run main.go

Вывод

Table: users | rows: 3

  id:             1
  name:           Alice
  email:          alice@example.com

  id:             2
  name:           Bob
  ...

Ключевые API

parser := packet.NewParser()
pkt, _ := parser.ParseWithDecompression(f, func(_ context.Context, compressed, algo string) ([]string, error) {
    return processors.DecompressDataForTdtpWithAlgo(compressed, algo)
})

for _, row := range pkt.GetRows() { ... }

См. также

  • examples/basic — создание и парсинг пакетов через Go API
  • tdtpcli --inspect file.tdtp.xml — metadata без Go кода

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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