mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-06 04:52:39 +00:00
⚡ Have better logging in Docker pull of pcap
command
This commit is contained in:
17
utils/json.go
Normal file
17
utils/json.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func UnescapeUnicodeCharacters(raw string) string {
|
||||
str, err := strconv.Unquote(strings.Replace(strconv.Quote(raw), `\\u`, `\u`, -1))
|
||||
if err != nil {
|
||||
log.Error().Err(err).Send()
|
||||
return raw
|
||||
}
|
||||
return str
|
||||
}
|
Reference in New Issue
Block a user