workaround to allow lowercase in json while still exporting struct field

This commit is contained in:
Arya Kiran 2023-01-18 22:36:57 +05:30
parent e934aa5a92
commit 2b3b221baf
Signed by untrusted user who does not match committer: arya
GPG Key ID: 842D12BDA50DF120

24
main.go
View File

@ -12,20 +12,20 @@ import (
)
type Userstruct struct {
Status int
Online int
Total int
Users []Userinfo
Status int `json:"status"`
Online int `json:"online"`
Total int `json:"total"`
Users []Userinfo `json:"users"`
}
type Userinfo struct {
Name string
FullName string
Loc string
Email string
Desc string
Website string
Capsule string
Online bool
Name string `json:"name"`
FullName string `json:"fullName"`
Loc string `json:"loc"`
Email string `json:"email"`
Desc string `json:"desc"`
Website string `json:"website"`
Capsule string `json:"capsule"`
Online bool `json:"online"`
}
func Dedup(input string) string {