()
| 155 | } |
| 156 | |
| 157 | func (slc *ServerLogConfig) clone() *ServerLogConfig { |
| 158 | clone := &ServerLogConfig{ |
| 159 | DefaultLoggerName: slc.DefaultLoggerName, |
| 160 | LoggerNames: make(map[string]StringArray), |
| 161 | SkipHosts: append([]string{}, slc.SkipHosts...), |
| 162 | SkipUnmappedHosts: slc.SkipUnmappedHosts, |
| 163 | ShouldLogCredentials: slc.ShouldLogCredentials, |
| 164 | } |
| 165 | for k, v := range slc.LoggerNames { |
| 166 | clone.LoggerNames[k] = append([]string{}, v...) |
| 167 | } |
| 168 | return clone |
| 169 | } |
| 170 | |
| 171 | // StringArray is a slices of strings, but also accepts |
| 172 | // a single string as a value when JSON unmarshaling, |
no outgoing calls
no test coverage detected