Remove unused shortHostname helper
All checks were successful
check / check (push) Successful in 2m24s

Was added when PurgeSnapshots needed hostname-aware name parsing.
After adopting parseSnapshotName(snapshotID) from origin, the
helper has no callers.
This commit is contained in:
2026-05-02 03:20:56 +02:00
parent 0889cf2804
commit 20d3a9ac8c

View File

@@ -728,19 +728,6 @@ func (v *Vaultik) confirmAndExecutePurge(toDelete []SnapshotInfo, force, quiet b
return nil return nil
} }
// shortHostname returns the configured hostname stripped of its domain suffix.
// This matches the hostname-prefix used when building snapshot IDs.
func (v *Vaultik) shortHostname() string {
hostname := v.Config.Hostname
if hostname == "" {
hostname, _ = os.Hostname()
}
if idx := strings.Index(hostname, "."); idx != -1 {
hostname = hostname[:idx]
}
return hostname
}
// VerifySnapshot checks snapshot integrity // VerifySnapshot checks snapshot integrity
func (v *Vaultik) VerifySnapshot(snapshotID string, deep bool) error { func (v *Vaultik) VerifySnapshot(snapshotID string, deep bool) error {
opts := &VerifyOptions{Deep: deep} opts := &VerifyOptions{Deep: deep}