MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / DeleteSettingItemByKey

Function DeleteSettingItemByKey

internal/op/setting.go:189–199  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

187}
188
189func DeleteSettingItemByKey(key string) error {
190 old, err := GetSettingItemByKey(key)
191 if err != nil {
192 return errors.WithMessage(err, "failed to get settingItem")
193 }
194 if !old.IsDeprecated() {
195 return errors.Errorf("setting [%s] is not deprecated", key)
196 }
197 SettingCacheUpdate()
198 return db.DeleteSettingItemByKey(key)
199}
200
201type MigrationValueItem struct {
202 MigrationValue, Value string

Callers 1

DeleteSettingFunction · 0.92

Calls 4

DeleteSettingItemByKeyFunction · 0.92
SettingCacheUpdateFunction · 0.85
IsDeprecatedMethod · 0.80
GetSettingItemByKeyFunction · 0.70

Tested by

no test coverage detected