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: arya
GPG Key ID: 842D12BDA50DF120

24
main.go
View File

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