Beispiel
parse and format go.mod files with modfile.Parse and Format
sha256:71e0797231b584a060b79b64fa09f95d288e5026ab2990b0d5dc1f2f5b9f9731
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-23 |
Fall
HOW- Ziel
- parse and format go.mod files with modfile.Parse and Format
- Pakete
- Symbole
-
- modfile.Parse
- Erstellt
- 2026-08-23T16:29:16Z
Contract
- modfile.Parse parses a go.mod file into a File struct with module path and Go version
- modfile.File.AddRequire adds a required dependency module path and version to the modfile
- modfile.Format formats a modfile.File AST back into standard go.mod formatted bytes
- modfile.File.DropRequire removes an existing requirement from the modfile AST
- modfile.File.AddReplace adds a module replace directive to the modfile AST
- modfile.Parse returns an error when parsing malformed go.mod content
Dateien
- PROMPT.md
- csx.json
- go.mod
- go.sum
- main.go
- spec.json
- test/contract.go
Ursprungs-Seeder
anonym