Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
812ab677
authored
Oct 15, 2025
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: replace iota with explicit values for log type constants
parent
b9c2089d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
model/log.go
+8
-7
No files found.
model/log.go
View file @
812ab677
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment