Remove unused shortHostname helper
All checks were successful
check / check (push) Successful in 2m24s
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:
@@ -728,19 +728,6 @@ func (v *Vaultik) confirmAndExecutePurge(toDelete []SnapshotInfo, force, quiet b
|
||||
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
|
||||
func (v *Vaultik) VerifySnapshot(snapshotID string, deep bool) error {
|
||||
opts := &VerifyOptions{Deep: deep}
|
||||
|
||||
Reference in New Issue
Block a user