chore: optimize variable naming

This commit is contained in:
henry.chen
2023-01-05 11:07:56 +08:00
parent 3a5eb6fccc
commit 04289c633e
5 changed files with 16 additions and 27 deletions

View File

@@ -50,6 +50,7 @@ func handleAdminProfile(c *gin.Context) {
renderHTMLAdminLayout(c, "admin-profile", params)
}
// T tag struct
type T struct {
ID string `json:"id"`
Tags string `json:"tags"`

View File

@@ -222,7 +222,7 @@ func handleDisqusList(c *gin.Context) {
ID: v.ID,
Name: v.Author.Name,
Parent: v.Parent,
Url: v.Author.ProfileUrl,
URL: v.Author.ProfileURL,
Avatar: v.Author.Avatar.Cache,
CreatedAtStr: tools.ConvertStr(v.CreatedAt),
Message: v.Message,
@@ -261,7 +261,7 @@ type commentsDetail struct {
ID string `json:"id"`
Parent int `json:"parent"`
Name string `json:"name"`
Url string `json:"url"`
URL string `json:"url"`
Avatar string `json:"avatar"`
CreatedAtStr string `json:"createdAtStr"`
Message string `json:"message"`
@@ -292,7 +292,7 @@ func handleDisqusCreate(c *gin.Context) {
AuthorEmail: email,
AuthorName: name,
Identifier: identifier,
IpAddress: c.ClientIP(),
IPAddress: c.ClientIP(),
}
postDetail, err := internal.PostCreate(&comment)
if err != nil {
@@ -312,7 +312,7 @@ func handleDisqusCreate(c *gin.Context) {
ID: postDetail.Response.ID,
Name: name,
Parent: postDetail.Response.Parent,
Url: postDetail.Response.Author.ProfileUrl,
URL: postDetail.Response.Author.ProfileURL,
Avatar: postDetail.Response.Author.Avatar.Cache,
CreatedAtStr: tools.ConvertStr(postDetail.Response.CreatedAt),
Message: postDetail.Response.Message,