(key string, params []string)
| 102 | } |
| 103 | |
| 104 | func (h *Http) RemoveDirective(key string, params []string) { |
| 105 | directives := h.GetDirectives() |
| 106 | var newDirectives []IDirective |
| 107 | for _, dir := range directives { |
| 108 | if dir.GetName() == key { |
| 109 | if IsRepeatKey(key) && len(params) > 0 { |
| 110 | oldParams := dir.GetParameters() |
| 111 | if oldParams[0] == params[0] { |
| 112 | continue |
| 113 | } |
| 114 | } else { |
| 115 | continue |
| 116 | } |
| 117 | } |
| 118 | newDirectives = append(newDirectives, dir) |
| 119 | } |
| 120 | h.Directives = newDirectives |
| 121 | } |
| 122 | |
| 123 | func (h *Http) GetBlock() IBlock { |
| 124 | return h |
nothing calls this directly
no test coverage detected