MCPcopy Create free account
hub / github.com/codehamr/codehamr / EnsureHamrpass

Method EnsureHamrpass

internal/config/config.go:212–222  ·  view source on GitHub ↗

EnsureHamrpass returns the hamrpass profile, re-creating it from the seed if the user deleted it. Lets /hamrpass activate by pasting a key without a restart detour.

()

Source from the content-addressed store, hash-verified

210// the user deleted it. Lets /hamrpass activate by pasting a key without a
211// restart detour.
212func (c *Config) EnsureHamrpass() *Profile {
213 if hp, ok := c.Models["hamrpass"]; ok {
214 return hp
215 }
216 tmpl := managedProfiles["hamrpass"]
217 if c.Models == nil {
218 c.Models = map[string]*Profile{}
219 }
220 c.Models["hamrpass"] = &tmpl
221 return c.Models["hamrpass"]
222}
223
224// ResolvedKey returns the profile's key, expanding it against the process
225// environment when the WHOLE key is a `${VAR}` reference (the advertised

Callers 3

activateHamrpassMethod · 0.80

Calls

no outgoing calls