Have better logging in Docker pull of pcap command

This commit is contained in:
M. Mert Yildiran
2022-12-27 10:25:42 +03:00
parent f6bde5fe76
commit d9e53b20c1
5 changed files with 64 additions and 46 deletions

17
utils/json.go Normal file
View 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
}