31 lines
624 B
Go
31 lines
624 B
Go
package forgepb
|
|
|
|
import (
|
|
sync "sync"
|
|
|
|
"go.wit.com/lib/protobuf/gitpb"
|
|
"go.wit.com/lib/protobuf/zoopb"
|
|
)
|
|
|
|
// maybe an interface someday?
|
|
type Forge struct {
|
|
// one-time initialized data
|
|
initOnce sync.Once
|
|
initErr error // init error, if any
|
|
|
|
goSrc string // the path to go/src
|
|
goWork bool // means the user is currently using a go.work file
|
|
Config *ForgeConfigs // config repos for readonly, private, etc
|
|
Repos *gitpb.Repos
|
|
Machine *zoopb.Machine
|
|
configSave bool
|
|
}
|
|
|
|
func (f *Forge) GetGoSrc() string {
|
|
return f.goSrc
|
|
}
|
|
|
|
func (f *Forge) IsGoWork() bool {
|
|
return f.goWork
|
|
}
|