MCPcopy Create free account
hub / github.com/cogentcore/core / init

Method init

core/windowgeometry.go:62–70  ·  view source on GitHub ↗

init does initialization if not yet initialized

()

Source from the content-addressed store, hash-verified

60
61// init does initialization if not yet initialized
62func (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
73func (ws *windowGeometrySaver) resetCache() {

Callers 2

openMethod · 0.95
recordPrefMethod · 0.95

Calls 1

resetCacheMethod · 0.95

Tested by

no test coverage detected