mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
cleanup: address gomnd warnings
Direct usage of numbers should be avoided. Issue reported: mnd: Magic number: X, in <argument> detected (gomnd) Signed-off-by: Yug <yuggupta27@gmail.com>
This commit is contained in:
@ -118,7 +118,8 @@ func (s *nonBlockingGRPCServer) serve(endpoint, hstOptions string, ids csi.Ident
|
||||
util.DefaultLog("Listening for connections on address: %#v", listener.Addr())
|
||||
if metrics {
|
||||
ho := strings.Split(hstOptions, ",")
|
||||
if len(ho) != 3 {
|
||||
const expectedHo = 3
|
||||
if len(ho) != expectedHo {
|
||||
klog.Fatalf("invalid histogram options provided: %v", hstOptions)
|
||||
}
|
||||
start, e := strconv.ParseFloat(ho[0], 32)
|
||||
|
Reference in New Issue
Block a user