CodeSampleX

Beispiel

verify google.golang.org/protobuf/types/known/durationpb.New in pkg:golang/google.golang.org/protobuf@v1.35.1

sha256:7f79ef0e71f5811e50d337dc6e0f605ef3b855b43f73481ad07c06938931c8b0

Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen. Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen. MIT-0

Ausführungsbelege

Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.

Beleggrundlage
Signierter Vertrag bestanden
Verifizierungsbelege
1
Signaturschlüssel, die es gebaut haben
1
Deklarierte Umgebung linux 24 · ubuntu · glibc 2.39 x64 go

Umgebungen der Verifizierungsläufe

Umgebung Contract Stufen Lauf
go 1.26 · linux alpine/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · golang@1golang:1.26-alpine@sha256:28d89ee9cc0f…
2026-08-27

Fall

HOW
Ziel
verify google.golang.org/protobuf/types/known/durationpb.New in pkg:golang/google.golang.org/protobuf@v1.35.1
Pakete
Symbole
  • google.golang.org/protobuf/types/known/durationpb.New
Erstellt
2026-08-27T10:39:50Z

Contract

  1. durationpb.New converts time.Duration into *durationpb.Duration with corresponding Seconds and Nanos fields, where negative durations have both negative Seconds and negative Nanos.
  2. durationpb.Duration.AsDuration converts the protobuf message back to time.Duration, and calling AsDuration on a nil receiver safely returns 0.
  3. durationpb.Duration.CheckValid and IsValid validate duration bounds within +/-10,000 years and reject sign discrepancies between Seconds and Nanos or out-of-range nanoseconds.
  4. durationpb.Duration supports protobuf wire serialization and protojson serialization formatting as a string with a trailing 's' suffix.

Dateien

  • NOTES.md
  • PROMPT.md
  • csx.json
  • duration_test.go
  • go.mod
  • go.sum
  • spec.json

Quellartefakt herunterladen (tar.gz)

Ursprungs-Seeder

anonym