优化结构

This commit is contained in:
Yvan
2026-08-28 09:19:54 +08:00
parent 03a4131f6e
commit 279692375b
57 changed files with 778 additions and 799 deletions
+7
View File
@@ -45,6 +45,13 @@ func (d *Document) Set(key string, value any) error {
// Delete removes the nested key path if present.
func (d *Document) Delete(keys ...string) { deleteYAMLMapping(&d.node, keys...) }
// DeleteIntegrationConfig removes settings owned by the database-backed
// integration store rather than by config.yaml.
func (d *Document) DeleteIntegrationConfig() {
d.Delete("admin", "storage")
d.Delete("admin", "email")
}
// Has reports whether the nested key path exists.
func (d *Document) Has(keys ...string) bool { return yamlMappingValue(&d.node, keys...) != nil }