diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-12-18 13:45:55 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-12-18 13:45:55 +0900 |
| commit | b752ec44689aa5a3a0f3b9672b218691f161c7c1 (patch) | |
| tree | b514cb0c247f8deaa9feba84d9f8944623911f5d /internal/state/simple.go | |
| parent | 5d00805a7c775382516e05b5b01e58df651408ab (diff) | |
fipc: export config struct
Also store full config as part of state.
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'internal/state/simple.go')
| -rw-r--r-- | internal/state/simple.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/state/simple.go b/internal/state/simple.go index ad3e4726..1a26f6f7 100644 --- a/internal/state/simple.go +++ b/internal/state/simple.go @@ -176,6 +176,10 @@ func (b *simpleBackend) Save(state *State) error { b.lock.Lock() defer b.lock.Unlock() + if state.Config == nil { + return errors.New("state does not contain config") + } + statePath := b.filename(state.PID) // create and open state data file |
