Commit 812ab677 by CaIon

refactor: replace iota with explicit values for log type constants

parent b9c2089d
...@@ -39,14 +39,15 @@ type Log struct { ...@@ -39,14 +39,15 @@ type Log struct {
Other string `json:"other"` Other string `json:"other"`
} }
// don't use iota, avoid change log type value
const ( const (
LogTypeUnknown = iota LogTypeUnknown = 0
LogTypeTopup LogTypeTopup = 1
LogTypeConsume LogTypeConsume = 2
LogTypeManage LogTypeManage = 3
LogTypeSystem LogTypeSystem = 4
LogTypeError LogTypeError = 5
LogTypeRefund LogTypeRefund = 6
) )
func formatUserLogs(logs []*Log) { func formatUserLogs(logs []*Log) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment