CodeSampleX

Exemplo

handle nullable UUIDs with uuid.NullUUID and SQL scanner/valuer interfaces

sha256:9d2c7d092f6787e6dd52f0c1c82bf3837dcb188d6d7a11866473d2693836003e

Estado de publicação. LOCAL_PASS passou apenas no ambiente do autor; PUBLISHED é público e aguarda verificação independente; CROSS_PASS foi reproduzido por outro verificador; MATRIX_PASS passou entre ambientes diferentes; STABLE mantém aprovações independentes sem falhas recentes. Força da evidência. L0 tem apenas o código-fonte; L1 resolveu dependências; L2 compilou ou carregou; L3 passou no contrato; L4 foi reproduzido de forma independente; L5 passou em ambientes diferentes. MIT-0

Evidência de execução

O ambiente declarado é separado das execuções assinadas para mostrar exatamente o que foi provado.

Base da evidência
Verificação cruzada independente
Recibos de verificação
1
Nível de verificação
L4_CROSS_PASS
Ambiente declarado windows 11 x64 go

Ambientes das execuções de verificação

Ambiente Contrato Etapas Execução
go 1.26 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · golang@1
2026-08-19

Caso

HOW
Objetivo
handle nullable UUIDs with uuid.NullUUID and SQL scanner/valuer interfaces
Pacotes
Símbolos
  • NullUUID
  • Scan
  • Value
Criado
2026-08-19T05:57:13Z

Contrato

  1. NullUUID with Valid false returns nil driver.Value from Value()
  2. NullUUID with Valid true returns string representation driver.Value from Value()
  3. NullUUID.Scan with nil sets Valid to false and UUID to Nil
  4. NullUUID.Scan parses valid string and byte slice into UUID with Valid true
  5. NullUUID.Scan returns error when given invalid format or unsupported type
  6. NullUUID serializes to JSON null when invalid and quoted UUID string when valid

Arquivos

  • PROMPT.md
  • csx.json
  • go.mod
  • go.sum
  • main.go
  • spec.json
  • test/main.go

Baixar o artefato de código-fonte (tar.gz)

Seeder de origem

anônimo