fix: gofmt alignment in http3 server and surface errors in main.go demo

- gofmt the x509.Certificate struct literal in generateTLSConfig
- grpcSample() now checks and prints errors from http3.ServerRun and
  http3.ClientRun instead of silently discarding them (e.g. port
  conflicts previously failed with no output)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-17 22:36:51 +09:00
co-authored by Claude Sonnet 5
parent 50f63633ea
commit db35f38c05
2 changed files with 15 additions and 10 deletions
+4 -4
View File
@@ -33,11 +33,11 @@ func generateTLSConfig() (*tls.Config, error) {
Subject: pkix.Name{
Organization: []string{"gRPC HTTP3 Canary"},
},
NotBefore: time.Now(),
NotAfter: time.Now().Add(365 * 24 * time.Hour),
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature,
NotBefore: time.Now(),
NotAfter: time.Now().Add(365 * 24 * time.Hour),
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature,
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
DNSNames: []string{"localhost"},
DNSNames: []string{"localhost"},
IPAddresses: []net.IP{net.ParseIP("127.0.0.1"), net.ParseIP("::1")},
}