From 636068c5b790564915f59960c1a6ceebe877c978 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 26 Oct 2024 10:17:55 -0500 Subject: [PATCH] export these func() Signed-off-by: Jeff Carr --- addDroplet.go | 2 +- validate.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addDroplet.go b/addDroplet.go index 092040a..14beff4 100644 --- a/addDroplet.go +++ b/addDroplet.go @@ -360,7 +360,7 @@ func updateDisk(cluster *pb.Cluster, d *pb.Droplet, domcfg *libvirtxml.Domain) ( continue } - e, err := insertFilename(cluster, d, filename) + e, err := InsertFilename(cluster, d, filename) if err != nil { return alle, err } diff --git a/validate.go b/validate.go index 979d201..bfac46a 100644 --- a/validate.go +++ b/validate.go @@ -72,7 +72,7 @@ func lookupFilename(cluster *pb.Cluster, filename string) *pb.Droplet { return nil } -func insertFilename(cluster *pb.Cluster, d *pb.Droplet, filename string) (*pb.Event, error) { +func InsertFilename(cluster *pb.Cluster, d *pb.Droplet, filename string) (*pb.Event, error) { dupd := lookupFilename(cluster, filename) if dupd != nil { log.Info("file", filename, "already on droplet", dupd.Hostname) @@ -105,7 +105,7 @@ func insertFilename(cluster *pb.Cluster, d *pb.Droplet, filename string) (*pb.Ev return e, nil } -func checkUniqueFilenames(cluster *pb.Cluster) bool { +func CheckUniqueFilenames(cluster *pb.Cluster) bool { var ok bool = true var disks map[string]string disks = make(map[string]string) @@ -135,7 +135,7 @@ func checkUniqueFilenames(cluster *pb.Cluster) bool { return ok } -func checkDiskFilenames(cluster *pb.Cluster) []*pb.Event { +func CheckDiskFilenames(cluster *pb.Cluster) []*pb.Event { var alle []*pb.Event for _, d := range cluster.Droplets { @@ -167,7 +167,7 @@ func checkDiskFilenames(cluster *pb.Cluster) []*pb.Event { return alle } -func checkDroplets(cluster *pb.Cluster, dump bool) bool { +func CheckDroplets(cluster *pb.Cluster, dump bool) bool { // uuid map to check for duplicates var umap map[string]string umap = make(map[string]string)