Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
liang hong
CommentSever
Commits
4c00d6d8
Commit
4c00d6d8
authored
Jun 19, 2025
by
CodeFever888
Browse files
'sever'
parent
899547a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
main.go
View file @
4c00d6d8
...
@@ -81,7 +81,7 @@ func getHandler(w http.ResponseWriter, r *http.Request) {
...
@@ -81,7 +81,7 @@ func getHandler(w http.ResponseWriter, r *http.Request) {
var
comments
[]
Comment
var
comments
[]
Comment
var
total
int64
var
total
int64
db
.
Model
(
&
Comment
{})
.
Count
(
&
total
)
db
.
Model
(
&
Comment
{})
.
Count
(
&
total
)
db
.
Offset
((
pageInt
-
1
)
*
sizeInt
)
.
Limit
(
sizeInt
)
.
Find
(
&
comments
)
db
.
Order
(
"id desc"
)
.
Offset
((
pageInt
-
1
)
*
sizeInt
)
.
Limit
(
sizeInt
)
.
Find
(
&
comments
)
response
:=
Response
{
response
:=
Response
{
Code
:
0
,
Code
:
0
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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