MCPcopy
hub / github.com/runfinch/finch / applyDefaults

Function applyDefaults

pkg/config/defaults_darwin.go:87–108  ·  view source on GitHub ↗

applyDefaults sets default configuration options if they are not already set.

(
	cfg *Finch,
	deps LoadSystemDeps,
	mem fmemory.Memory,
	ecc command.Creator,
)

Source from the content-addressed store, hash-verified

85
86// applyDefaults sets default configuration options if they are not already set.
87func applyDefaults(
88 cfg *Finch,
89 deps LoadSystemDeps,
90 mem fmemory.Memory,
91 ecc command.Creator,
92) *Finch {
93 cpuDefault(cfg, deps)
94 memoryDefault(cfg, mem)
95 supportsVz := false
96 vz, err := SupportsVirtualizationFramework(ecc)
97 if err == nil && vz {
98 supportsVz = true
99 }
100 vmDefault(cfg, supportsVz)
101 rosettaDefault(cfg)
102 credHelperDefault(cfg)
103
104 bootDiskDefault(cfg)
105 dataDiskDefault(cfg)
106
107 return cfg
108}

Callers

nothing calls this directly

Calls 8

cpuDefaultFunction · 0.85
memoryDefaultFunction · 0.85
rosettaDefaultFunction · 0.85
credHelperDefaultFunction · 0.85
bootDiskDefaultFunction · 0.85
dataDiskDefaultFunction · 0.85
vmDefaultFunction · 0.70

Tested by

no test coverage detected