Help us shape the future of Go! Take the 2026 Go Developer Survey

cmd

package
v0.0.0-...-b60a861 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package cmd implements sslmon's command-line interface. main.go is only a shim that calls Main; everything else lives here so the root package stays trivial.

The interface is deliberately tiny: the common case — "show me a domain's certificates" — needs no subcommand, just `sslmon <domain>`. `watch` and `logs` are the only verbs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(args []string) int

Main parses the command line and dispatches. It returns a process exit code.

The first argument selects a verb (watch, logs); anything else is treated as the default list action, so `sslmon example.com` and `sslmon -i` just work.

Types

type Row

type Row struct {
	NotBefore   time.Time `json:"not_before"`
	NotAfter    time.Time `json:"not_after"`
	CommonName  string    `json:"common_name"`
	Names       []string  `json:"names"`
	Issuer      string    `json:"issuer"`
	Source      string    `json:"source"`                // "crt.sh" or the CT log description
	Reference   string    `json:"reference"`             // crt.sh URL or "<log-url>#<index>"
	Fingerprint string    `json:"fingerprint,omitempty"` // SHA-256, watch mode only
}

Row is the unified output shape for a certificate, whether it came from a crt.sh lookup or a live CT-log observation. Keeping one shape means -f tsv and -f json look the same across commands, so downstream tools can be reused.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL