feat: 增加设置默认网站功能

This commit is contained in:
zhengkunwang223
2023-01-03 16:56:36 +08:00
committed by zhengkunwang223
parent 6d290f6a73
commit 869f552cf8
16 changed files with 189 additions and 26 deletions

View File

@@ -32,23 +32,6 @@ func (b *Block) FindDirectives(directiveName string) []IDirective {
return directives
}
//func (b *Block) UpdateDirectives(directiveName string, directive Directive) {
// directives := b.GetDirectives()
// index := -1
// for i, dir := range directives {
// if dir.GetName() == directiveName {
// index = i
// break
// }
// }
// if index > -1 {
// directives[index] = &directive
// } else {
// directives = append(directives, &directive)
// }
// b.Directives = directives
//}
func (b *Block) UpdateDirective(key string, params []string) {
if key == "" || len(params) == 0 {
return