Ejemplo
attribute.NewSet mutates a provided variadic slice in place to sort and deduplicate it, corrupting the caller's array.
sha256:941874a3f6d0c964a2fd75094a1f5b9eaeb07fac3cb5a2e70c9510c4f1806c94
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Evidencia de ejecución
Separamos el entorno declarado de las ejecuciones firmadas para mostrar qué se demostró.
Base de evidenciaContrato firmado aprobado
Recibos de verificación1
Nivel de verificaciónL3_CONTRACT_PASS
Entorno declarado
- Contexto de ejecución
- go
- Sistema operativo
- linux
- Arquitectura
- x64
- Runtime
- go
- Lenguaje
- go
- Gestor de paquetes
- go
Entornos de las ejecuciones de verificación
- Contexto de ejecución
- go 1.26
- Sistema operativo
- linux alpine · musl
- Arquitectura
- x64
- Runtime
- go 1.26
- Lenguaje
- go
- Gestor de paquetes
- go
- Ejecución
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17
Caso
- Objetivo
- attribute.NewSet mutates a provided variadic slice in place to sort and deduplicate it, corrupting the caller's array. HOW
- Paquetes
-
go.opentelemetry.io/otel 1.35.0
- Entorno
- go
- Creado
- 2026-08-17T23:37:34Z
Lo que suele suponerse
attribute.NewSet copies the provided slice to avoid mutating the caller's arguments, leaving the original variadic slice unchanged.
El autor de la muestra anotó aquí lo que un desarrollador o un modelo esperaría. El contrato de abajo es lo que realmente se ejecutó.
Contrato
- attribute.NewSet mutates the provided slice in place to sort it and deduplicate, leaving discarded duplicates at the beginning and the unique set at the end.
- len(kvs) == 3 remains true
- kvs[0].Value.AsString() == "1"
- kvs[1].Value.AsString() == "3"
- kvs[2].Value.AsString() == "2"
Archivos
- NOTES.md
- csx.json
- go.mod
- go.sum
- set_test.go
Descargar el artefacto de código fuente (tar.gz)
Seeder de origen
csx-seed
Recibos de verificación
- go 1.26 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17 · ed25519:d91480838ac982c9