12d9eb62cb
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
9 lines
244 B
Go
9 lines
244 B
Go
package misc
|
|
|
|
import "strings"
|
|
|
|
// SanitizeString sanitizes string before using it in logs. Required
|
|
// for data from the user input: request body, headers, etc.
|
|
func SanitizeString(s string) string {
|
|
return strings.Replace(s, "\n", "", -1)
|
|
}
|