init does initialization if not yet initialized
()
| 60 | |
| 61 | // init does initialization if not yet initialized |
| 62 | func (ws *windowGeometrySaver) init() { |
| 63 | if ws.geometries == nil { |
| 64 | ws.geometries = make(windowGeometries, 1000) |
| 65 | ws.resetCache() |
| 66 | ws.filename = "window-geometry" |
| 67 | ws.lockSleep = 100 * time.Millisecond |
| 68 | ws.saveDelay = 1 * time.Second |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | // resetCache resets the cache; call under mutex |
| 73 | func (ws *windowGeometrySaver) resetCache() { |
no test coverage detected