new: http parser

This commit is contained in:
evilsocket 2018-01-10 03:06:05 +01:00
commit c98191c43e
4 changed files with 56 additions and 0 deletions

View file

@ -48,3 +48,13 @@ func vPort(p interface{}) string {
return sp
}
var maxUrlSize = 40
func vURL(u string) string {
ul := len(u)
if ul > maxUrlSize {
u = fmt.Sprintf("%s...", u[0:maxUrlSize-3])
}
return u
}