From 273c0f5451618a3442343cd8397df820a35dcd6e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 21 Oct 2024 22:19:07 -0500 Subject: [PATCH] does a single droplet Signed-off-by: Jeff Carr --- configfile/Makefile | 1 + configfile/main.go | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/configfile/Makefile b/configfile/Makefile index b1a31f3..4f609e1 100644 --- a/configfile/Makefile +++ b/configfile/Makefile @@ -1,5 +1,6 @@ build: GO111MODULE=off go build + ./configfile prep: go get -v -t -u diff --git a/configfile/main.go b/configfile/main.go index 56a0d28..0de54bb 100644 --- a/configfile/main.go +++ b/configfile/main.go @@ -20,14 +20,18 @@ func main() { if err != nil { log.Fatalln("Error reading file:", err) } - allEvents := &pb.Droplet{} - if err := proto.Unmarshal(in, allEvents); err != nil { + + var allEvents pb.Droplet + if err := proto.Unmarshal(in, &allEvents); err != nil { log.Fatalln("Failed to parse events:", err) } // listPeople(os.Stdout, allEvents) // got := in.String() - log.Println(in) + log.Println(allEvents) + //for i, d := range allEvents { + // log.Println("i =", i, "d =", d) + //} } func marshalWriteToFile(myWriter *bufio.Writer, e *pb.Droplet) {