Skip to content

Commit

Permalink
Remove redundant struct definition
Browse files Browse the repository at this point in the history
  • Loading branch information
jenrik committed Dec 4, 2024
1 parent 7b5d42d commit 9ab4bf4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
10 changes: 5 additions & 5 deletions pkg/tidydns/tidydns.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ type UserInfo struct {
}

type UserInfoGroup struct {
GroupName string
Name string
Notes *string
Id int
Description *string
GroupName string `json:"groupname"`
Name string `json:"name"`
Notes *string `json:"notes,omitempty"`
Id int `json:"id"`
Description *string `json:"description,omitempty"`
}

type UserID int
Expand Down
28 changes: 10 additions & 18 deletions pkg/tidydns/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,14 @@ type userCreate struct {
}

type userRead struct {
ModifiedBy string `json:"modified_by"`
Description string `json:"description"`
ModifiedDate string `json:"modified_date"`
Username string `json:"username"`
AuthGroup string `json:"auth_group"`
Name string `json:"name"`
Epassword string `json:"epassword"`
PasswdChangedDate string `json:"passwd_changed_date"`
Id int `json:"id"`
Groups []userGroup `json:"groups"`
}

type userGroup struct {
GroupName string `json:"groupname"`
Name string `json:"name"`
Notes *string `json:"notes,omitempty"`
Id int `json:"id"`
Description *string `json:"description,omitempty"`
ModifiedBy string `json:"modified_by"`
Description string `json:"description"`
ModifiedDate string `json:"modified_date"`
Username string `json:"username"`
AuthGroup string `json:"auth_group"`
Name string `json:"name"`
Epassword string `json:"epassword"`
PasswdChangedDate string `json:"passwd_changed_date"`
Id int `json:"id"`
Groups []UserInfoGroup `json:"groups"`
}

0 comments on commit 9ab4bf4

Please sign in to comment.