优化结构
This commit is contained in:
@@ -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 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user