Add Debian packaging, Makefile, manpages, tests, and design doc
Introduces a static-binary build and Debian package (amd64/arm64) with version/commit/date stamped via -ldflags. Ships section-1 manpages for ctool, ctfetch, and ctail. Adds a `version` subcommand reachable as `ctool version`, `ctool -version`, `ctool --version`, `ctool fetch version`, `ctool tail version`, and via the ctfetch/ctail symlinks. Adds tests covering the dispatcher, fetch/tail argument parsing, and the formatter/helper functions. Adds a retrofit design document modelled on the vpp-maglev one, with FRs and NFRs for each tool and the dispatcher. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -167,7 +167,7 @@ func FetchURL(url string) ([]byte, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func() { _ = resp.Body.Close() }()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return nil, fmt.Errorf("HTTP %d", resp.StatusCode)
|
||||
@@ -506,9 +506,7 @@ func parseCertDetails(certDER []byte) *CertDetails {
|
||||
IsCA: cert.IsCA,
|
||||
}
|
||||
|
||||
for _, e := range cert.EmailAddresses {
|
||||
d.EmailSANs = append(d.EmailSANs, e)
|
||||
}
|
||||
d.EmailSANs = append(d.EmailSANs, cert.EmailAddresses...)
|
||||
for _, u := range cert.URIs {
|
||||
d.URISANs = append(d.URISANs, u.String())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user