small helper function

This commit is contained in:
Miek Gieben 2011-09-20 19:33:37 +02:00
parent 2f74133d6a
commit 7df6476d8f
1 changed files with 7 additions and 0 deletions

View File

@ -116,6 +116,13 @@ func (f *fingerprint) String() string {
return s
}
// fingerStringNoSections returns the strings representation
// without the sections' count and the EDNS0 stuff
func (f *fingerprint) StringNoSections() string {
s := strings.SplitN(f.String(), ",", 11)
return strings.Join(s[:10], ",")
}
// SetString set the string to fp.. todo
func (f *fingerprint) setString(str string) {
for i, s := range strings.Split(str, ",") {