From 2015f84fb4a11f83452117cfb607e47c1d0c251e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 5 Sep 2025 07:10:02 -0500 Subject: add http headers to protobuf --- patchset.config.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'patchset.config.go') diff --git a/patchset.config.go b/patchset.config.go index 4f8eedf..6627141 100644 --- a/patchset.config.go +++ b/patchset.config.go @@ -32,6 +32,19 @@ func (f *Forge) LoadPatchsets() error { return nil } +func (f *Forge) InitPatchsets() error { + if err := f.LoadPatchsets(); err == nil { + return nil + } else { + log.Info("LoadPatchsets() failed", err) + } + // TODO: check if Unmarshal failed here + f.Patchsets = NewPatchsets() + tmp := f.findAutoPatchset() // makes the default setting + f.Patchsets.Append(tmp) + return f.SavePatchsets() +} + func (f *Forge) SavePatchsets() error { filename := filepath.Join(f.patchDir, "all-patches.pb") regfile, err := os.OpenFile(filename, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) -- cgit v1.2.3