diff --git a/internal/logic/common/getStatLogic.go b/internal/logic/common/getStatLogic.go index 4991d86..a40bde2 100644 --- a/internal/logic/common/getStatLogic.go +++ b/internal/logic/common/getStatLogic.go @@ -66,11 +66,11 @@ func (l *GetStatLogic) GetStat() (resp *types.GetStatResponse, err error) { country := 0 - protocolDict := make(map[string]void) + protocolDict := make(map[string]struct{}) var protocol []string l.svcCtx.DB.Model(&server.Server{}).Where("enable = true").Pluck("protocol", &protocol) for _, p := range protocol { - protocolDict[p] = v + protocolDict[p] = struct{}{} } protocol = nil for p := range protocolDict {