From c10d3410a2c48896c76a071643fdc8d1d7428498 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 28 Nov 2024 19:56:46 -0600 Subject: [PATCH] pull in machine --- init.go | 6 +++--- structs.go | 12 ++++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/init.go b/init.go index 843d869..1f8a24e 100644 --- a/init.go +++ b/init.go @@ -4,6 +4,7 @@ import ( "os" "go.wit.com/lib/protobuf/gitpb" + "go.wit.com/lib/protobuf/zoopb" "go.wit.com/log" ) @@ -31,9 +32,8 @@ func Init() *Forge { os.Exit(-1) } - if f.Repos == nil { - f.Repos = new(gitpb.Repos) - } + f.Repos = new(gitpb.Repos) + f.Machine = new(zoopb.Machine) f.goSrc = os.Getenv("FORGE_GOSRC") f.ScanGoSrc() diff --git a/structs.go b/structs.go index 8adc488..05ed89e 100644 --- a/structs.go +++ b/structs.go @@ -1,12 +1,16 @@ package forgepb -import "go.wit.com/lib/protobuf/gitpb" +import ( + "go.wit.com/lib/protobuf/gitpb" + "go.wit.com/lib/protobuf/zoopb" +) // maybe an interface someday? type Forge struct { - goSrc string // the path to go/src - Config *ForgeConfigs // config repos for readonly, private, etc - Repos *gitpb.Repos + goSrc string // the path to go/src + Config *ForgeConfigs // config repos for readonly, private, etc + Repos *gitpb.Repos + Machine *zoopb.Machine } func (f *Forge) GetGoSrc() string {