MCPcopy
hub / github.com/gogf/gf / SetReuseTargetStruct

Method SetReuseTargetStruct

os/gcfg/gcfg_loader.go:217–222  ·  view source on GitHub ↗

SetReuseTargetStruct sets whether to reuse the same target struct or create a new one on updates

(reuse bool)

Source from the content-addressed store, hash-verified

215
216// SetReuseTargetStruct sets whether to reuse the same target struct or create a new one on updates
217func (l *Loader[T]) SetReuseTargetStruct(reuse bool) *Loader[T] {
218 l.mutex.Lock()
219 defer l.mutex.Unlock()
220 l.reuse = reuse
221 return l
222}
223
224// StopWatch stops watching for configuration changes and removes the associated watcher
225func (l *Loader[T]) StopWatch(ctx context.Context) (bool, error) {

Callers 1

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 1