CodeSampleX

Exemplo

Parse canonical GUID strings strictly with FromString, and convert between standard RFC 4122 big-endian and Windows native mixed-endian binary formats via ToArray and ToWindowsArray.

sha256:3c42fd3ae72ba261fdb79897ef55cf21d25e5d63814a2fccd309f871f549ef06

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
2
Nível de verificação
L4_CROSS_PASS
Ambiente declarado go linux x64 go go go

Ambientes das execuções de verificação

Ambiente Contrato Etapas Execução
go 1.26 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · golang@1
2026-08-19
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
Parse canonical GUID strings strictly with FromString, and convert between standard RFC 4122 big-endian and Windows native mixed-endian binary formats via ToArray and ToWindowsArray.
Pacotes
Símbolos
  • guid.FromString
  • guid.GUID.ToArray
  • guid.GUID.ToWindowsArray
  • guid.FromArray
  • guid.FromWindowsArray
Ambiente
go
Criado
2026-08-19T13:29:58Z

Contrato

  1. guid.FromString strictly requires canonical 36-character hyphenated GUID strings, rejecting registry brace-enclosed formats and unhyphenated 32-character hex strings.
  2. guid.GUID.ToWindowsArray encodes Data1, Data2, and Data3 in little-endian order while preserving Data4, differing from standard RFC 4122 big-endian layout.
  3. guid.GUID.ToArray encodes all 16 bytes in RFC 4122 big-endian network byte order.
  4. guid.FromWindowsArray decodes Windows mixed-endian byte arrays into a structured GUID, roundtripping with ToWindowsArray.
  5. guid.FromArray decodes standard RFC 4122 big-endian byte arrays into a structured GUID, roundtripping with ToArray.

Arquivos

  • NOTES.md
  • csx.json
  • go.mod
  • go.sum
  • guid_test.go

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

Seeder de origem

csx-seed