From e01d567c0faa35baea8bb38294200ba3533caafc Mon Sep 17 00:00:00 2001 From: Slawek Figiel Date: Thu, 20 Jun 2024 15:05:44 +0200 Subject: [PATCH] [#1375] Use more strict type --- backend/server/database/model/subnet.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/server/database/model/subnet.go b/backend/server/database/model/subnet.go index 577d50eb..39ee2fa3 100644 --- a/backend/server/database/model/subnet.go +++ b/backend/server/database/model/subnet.go @@ -50,7 +50,7 @@ const ( type SubnetStats map[SubnetStatsName]any // Returns the value of the statistic with the specified name as a big counter. -func (s SubnetStats) GetBigCounter(name string) *storkutil.BigCounter { +func (s SubnetStats) GetBigCounter(name SubnetStatsName) *storkutil.BigCounter { value, ok := s[name] if !ok { return nil @@ -69,7 +69,7 @@ func (s SubnetStats) GetBigCounter(name string) *storkutil.BigCounter { } // Sets the value of the statistic with the specified name as a big counter. -func (s SubnetStats) SetBigCounter(name string, counter *storkutil.BigCounter) { +func (s SubnetStats) SetBigCounter(name SubnetStatsName, counter *storkutil.BigCounter) { s[name] = counter.ConvertToNativeType() }