Beispiel
google.golang.org/appengine v1.2.0: GeoPoint
Verifiziertes Beispiel für golang google.golang.org/appengine v1.2.0: GeoPoint. Der Vertrag lief auf go 1.26 · linux debian/x64 · docker und bestand.
sha256:48ab834a30c7a06388d99fb1215d1e41fba1e0f8fe0eee95d46f82575d8c3abe
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 debian/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · golang@1golang:1.26@sha256:e30143be198a… |
2026-10-17 |
Fall
HOW- Ziel
- verify google.golang.org/appengine.GeoPoint in pkg:golang/google.golang.org/appengine@v1.2.0
- Symbole
-
- google.golang.org/appengine.GeoPoint
- Erstellt
- 2026-10-17T03:31:39Z
Contract
- appengine.GeoPoint{Lat: 0, Lng: 0}.Valid() returns true and preserves Lat/Lng fields
- appengine.GeoPoint.Valid() returns true on boundary values Lat in [-90, 90] and Lng in [-180, 180]
- appengine.GeoPoint.Valid() returns false when Lat is outside [-90, 90] or Lng is outside [-180, 180]
Dateien
- PROMPT.md
- csx.json
- go.mod
- go.sum
- main.go
- spec.json
- test/contract.go
Quelltext
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify google.golang.org/appengine.GeoPoint in pkg:golang/google.golang.org/appengine@v1.2.0
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:golang/google.golang.org/appengine@v1.2.0
Demonstrate these symbols/APIs:
- google.golang.org/appengine.GeoPoint
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:65f05fdacd8ef71b29e62d33abec40b90c22985a753cc1f221d3e745f90196f6","contract":["appengine.GeoPoint{Lat: 0, Lng: 0}.Valid() returns true and preserves Lat/Lng fields","appengine.GeoPoint.Valid() returns true on boundary values Lat in [-90, 90] and Lng in [-180, 180]","appengine.GeoPoint.Valid() returns false when Lat is outside [-90, 90] or Lng is outside [-180, 180]"],"goal":"verify google.golang.org/appengine.GeoPoint in pkg:golang/google.golang.org/appengine@v1.2.0","kind":"HOW","packages":["pkg:golang/google.golang.org/appengine@v1.2.0"],"schemaVersion":1,"symbols":["google.golang.org/appengine.GeoPoint"]},"contractCommand":["go","run","./test"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"golang","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"go","schemaVersion":1},"license":"MIT-0","packages":["pkg:golang/google.golang.org/appengine@v1.2.0"],"schemaVersion":1,"subject":"pkg:golang/google.golang.org/appengine@v1.2.0","symbols":["google.golang.org/appengine.GeoPoint"],"verifierAdapter":"golang@1"}
module sample
go 1.26.0
require google.golang.org/appengine v1.2.0
require (
github.com/golang/protobuf v1.2.0 // indirect
golang.org/x/net v0.0.0-20180724234803-3673e40ba225 // indirect
golang.org/x/sync v0.24.0 // indirect
)
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225 h1:kNX+jCowfMYzvlSvJu5pQWEmyWFrBXJ3PBy10xKMXK8=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sync v0.24.0 h1:iqiDrGoDgyuvAKrhLQthUEzU/R378N78gXbBjxed7oA=
golang.org/x/sync v0.24.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
google.golang.org/appengine v1.2.0 h1:S0iUepdCWODXRvtE+gcRDd15L+k+k1AiHlMiMjefH24=
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
package main
import (
"fmt"
"google.golang.org/appengine"
)
func NewLocation(lat, lng float64) (appengine.GeoPoint, bool) {
gp := appengine.GeoPoint{Lat: lat, Lng: lng}
return gp, gp.Valid()
}
func main() {
gp, ok := NewLocation(37.7749, -122.4194)
fmt.Printf("GeoPoint(%v, %v) valid=%v\n", gp.Lat, gp.Lng, ok)
}
{
"schemaVersion": 1,
"goal": "verify google.golang.org/appengine.GeoPoint in pkg:golang/google.golang.org/appengine@v1.2.0",
"kind": "HOW",
"packages": [
"pkg:golang/google.golang.org/appengine@v1.2.0"
],
"symbols": [
"google.golang.org/appengine.GeoPoint"
]
}
package main
import (
"fmt"
"os"
"google.golang.org/appengine"
)
func main() {
validOrigin := appengine.GeoPoint{Lat: 0, Lng: 0}
if !validOrigin.Valid() || validOrigin.Lat != 0 || validOrigin.Lng != 0 {
fmt.Fprintf(os.Stderr, "expected origin (0, 0) to be valid\n")
os.Exit(1)
}
validBounds := []appengine.GeoPoint{
{Lat: 90, Lng: 180},
{Lat: -90, Lng: -180},
{Lat: 37.7749, Lng: -122.4194},
}
for _, gp := range validBounds {
if !gp.Valid() {
fmt.Fprintf(os.Stderr, "expected %+v to be valid\n", gp)
os.Exit(1)
}
}
invalidBounds := []appengine.GeoPoint{
{Lat: 90.0001, Lng: 0},
{Lat: -90.0001, Lng: 0},
{Lat: 0, Lng: 180.0001},
{Lat: 0, Lng: -180.0001},
}
for _, gp := range invalidBounds {
if gp.Valid() {
fmt.Fprintf(os.Stderr, "expected %+v to be invalid\n", gp)
os.Exit(1)
}
}
}
Ursprungs-Seeder
anonym