()
| 38 | } |
| 39 | |
| 40 | func (s *BootstrapState) SaveState() (err error) { |
| 41 | jsonState, err := json.Marshal(*s) |
| 42 | if err != nil { |
| 43 | return bosherr.WrapError(err, "Marshalling bootstrap state") |
| 44 | } |
| 45 | |
| 46 | err = s.fs.WriteFile(s.path, jsonState) |
| 47 | if err != nil { |
| 48 | return bosherr.WrapError(err, "Writing bootstrap state to file") |
| 49 | } |
| 50 | |
| 51 | return |
| 52 | } |
no test coverage detected