Skip to content

Commit e01d567

Browse files
committed
[#1375] Use more strict type
1 parent 0efc7fc commit e01d567

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/server/database/model/subnet.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const (
5050
type SubnetStats map[SubnetStatsName]any
5151

5252
// Returns the value of the statistic with the specified name as a big counter.
53-
func (s SubnetStats) GetBigCounter(name string) *storkutil.BigCounter {
53+
func (s SubnetStats) GetBigCounter(name SubnetStatsName) *storkutil.BigCounter {
5454
value, ok := s[name]
5555
if !ok {
5656
return nil
@@ -69,7 +69,7 @@ func (s SubnetStats) GetBigCounter(name string) *storkutil.BigCounter {
6969
}
7070

7171
// Sets the value of the statistic with the specified name as a big counter.
72-
func (s SubnetStats) SetBigCounter(name string, counter *storkutil.BigCounter) {
72+
func (s SubnetStats) SetBigCounter(name SubnetStatsName, counter *storkutil.BigCounter) {
7373
s[name] = counter.ConvertToNativeType()
7474
}
7575

0 commit comments

Comments
 (0)