(key string, params []string)
| 112 | } |
| 113 | |
| 114 | func (us *Upstream) RemoveDirective(key string, params []string) { |
| 115 | directives := us.Directives |
| 116 | var newDirectives []IDirective |
| 117 | for _, dir := range directives { |
| 118 | if dir.GetName() == key { |
| 119 | if IsRepeatKey(key) && len(params) > 0 { |
| 120 | oldParams := dir.GetParameters() |
| 121 | if oldParams[0] == params[0] { |
| 122 | continue |
| 123 | } |
| 124 | } else { |
| 125 | continue |
| 126 | } |
| 127 | } |
| 128 | newDirectives = append(newDirectives, dir) |
| 129 | } |
| 130 | us.Directives = newDirectives |
| 131 | } |
| 132 | |
| 133 | func (us *Upstream) GetLine() int { |
| 134 | return us.Line |
nothing calls this directly
no test coverage detected