diff options
author | Sergey Elantsev <elantsev.s@yandex.ru> | 2020-03-15 23:45:50 +0300 |
---|---|---|
committer | Sergey Elantsev <elantsev.s@yandex.ru> | 2020-03-15 23:45:50 +0300 |
commit | a5f98d5dd530602a76af64afadd246f840fcca97 (patch) | |
tree | bfe5910bb03fdce4c3bd45604a8a747b14c0171d /pkg | |
parent | ff36bb98781c92fd8ec20c9a89c0c5a4f63b05da (diff) |
replaced fmt.Sprintf with strconv.Itoa for Protocol.String()
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/packet/bgp/constant.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/packet/bgp/constant.go b/pkg/packet/bgp/constant.go index f05ee4f2..6f87efdd 100644 --- a/pkg/packet/bgp/constant.go +++ b/pkg/packet/bgp/constant.go @@ -16,7 +16,6 @@ package bgp import ( - "fmt" "strconv" "strings" ) @@ -74,7 +73,7 @@ var ProtocolNameMap = map[Protocol]string{ func (p Protocol) String() string { name, ok := ProtocolNameMap[p] if !ok { - return fmt.Sprintf("%d", p) + return strconv.Itoa(int(p)) } return name } |