From 45c821fa98eea602e2de58a414084b7dfffe5e5e Mon Sep 17 00:00:00 2001 From: yusing Date: Fri, 9 Jan 2026 10:13:32 +0800 Subject: [PATCH] docs: simplify agent/pkg/certs README --- agent/pkg/certs/README.md | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/agent/pkg/certs/README.md b/agent/pkg/certs/README.md index 058cd62c..c7822cd9 100644 --- a/agent/pkg/certs/README.md +++ b/agent/pkg/certs/README.md @@ -97,35 +97,6 @@ const AgentCertsBasePath = "certs" Base directory for storing certificate archives. -```go -package main - -import ( - "os" - "github.com/yusing/godoxy/agent/pkg/certs" -) - -func main() { - // Read certificate files - caData, _ := os.ReadFile("ca.pem") - certData, _ := os.ReadFile("cert.pem") - keyData, _ := os.ReadFile("key.pem") - - // Create ZIP archive - zipData, err := certs.ZipCert(caData, certData, keyData) - if err != nil { - panic(err) - } - - // Save to file - os.WriteFile("agent-certs.zip", zipData, 0644) - - // Extract from archive - ca, crt, key, err := certs.ExtractCert(zipData) - // ... -} -``` - ## File Format The ZIP archive uses `zip.Store` compression (no compression) for fast creation and extraction. Each file is stored with its standard name (`ca.pem`, `cert.pem`, `key.pem`).