MCPcopy Create free account
hub / github.com/dotzero/git-profile / profileUpdateEntry

Function profileUpdateEntry

cmd/add.go:77–95  ·  view source on GitHub ↗
(
	cmd *cobra.Command,
	cfg storage,
	filename string,
	profile string,
	key string,
	value string,
)

Source from the content-addressed store, hash-verified

75}
76
77func profileUpdateEntry(
78 cmd *cobra.Command,
79 cfg storage,
80 filename string,
81 profile string,
82 key string,
83 value string,
84) error {
85 cfg.Store(profile, key, value)
86
87 err := cfg.Save(filename)
88 if err != nil {
89 return err
90 }
91
92 ui.Println(cmd, ui.SuccessStyle, "Successfully stored `%s=%s` to `%s` profile.\n", key, value, profile)
93
94 return nil
95}
96
97//nolint:funlen
98func profileUpdateEntries(

Callers 1

addCommandFunction · 0.85

Calls 3

PrintlnFunction · 0.92
StoreMethod · 0.65
SaveMethod · 0.65

Tested by

no test coverage detected