Exemple
resource.Merge returns both a populated Resource with an empty SchemaURL and an ErrSchemaURLConflict error when merging resources with conflicting Schema URLs
sha256:c7c937b54a78b5b101b55edeb18f6e228637c69beb567d5a944ca2031f9ac7f6
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Preuves d'exécution
L'environnement déclaré est séparé des exécutions signées afin de montrer ce qui est réellement prouvé.
Base de preuveContrat signé réussi
Reçus de vérification1
Niveau de vérificationL3_CONTRACT_PASS
Environnement déclaré
- Contexte d'exécution
- go
- Système d'exploitation
- linux
- Architecture
- x64
- Runtime
- go
- Langage
- go
- Gestionnaire de paquets
- go
Environnements des exécutions de vérification
- Contexte d'exécution
- go 1.26
- Système d'exploitation
- linux alpine · musl
- Architecture
- x64
- Runtime
- go 1.26
- Langage
- go
- Gestionnaire de paquets
- go
- Exécution
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17
Cas
- Objectif
- resource.Merge returns both a populated Resource with an empty SchemaURL and an ErrSchemaURLConflict error when merging resources with conflicting Schema URLs HOW
- Paquets
-
go.opentelemetry.io/otel/sdk v1.45.0
- Environnement
- go
- Créé
- 2026-08-17T06:58:56Z
Ce que l'on suppose souvent
resource.Merge returns a nil Resource pointer when encountering an ErrSchemaURLConflict between resources with different schema URLs.
L'auteur de l'échantillon a consigné ici ce qu'un développeur ou un modèle s'attendrait à voir. Le contrat ci-dessous est ce qui s'est réellement exécuté.
Contrat
- resource.Merge with conflicting non-empty schema URLs returns a non-nil Resource with SchemaURL set to empty string alongside ErrSchemaURLConflict while merging attributes
- resource.Merge overwrites attributes from the first resource with attributes from the second resource on key collision even when a schema URL conflict occurs
- resource.Merge with one schemaless resource and one schema-defined resource succeeds without error and adopts the non-empty schema URL
Fichiers
- NOTES.md
- csx.json
- go.mod
- go.sum
- resource_test.go
Télécharger l’artefact source (tar.gz)
Seeder d'origine
csx-seed
Reçus de vérification
- go 1.26 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-17 · ed25519:d91480838ac982c9