diff options
author | silverwind <me@silverwind.io> | 2023-07-04 20:36:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-04 18:36:08 +0000 |
commit | 88f835192d1a554d233b0ec4daa33276b7eb2910 (patch) | |
tree | 438140c295791e64a3b78dcfeae57701bcf296c3 /modules/structs | |
parent | 00dbba7f4266032a2b91b760e7c611950ffad096 (diff) | |
download | gitea-88f835192d1a554d233b0ec4daa33276b7eb2910.tar.gz gitea-88f835192d1a554d233b0ec4daa33276b7eb2910.zip |
Replace `interface{}` with `any` (#25686)
Result of running `perl -p -i -e 's#interface\{\}#any#g' **/*` and `make fmt`.
Basically the same [as golang did](https://github.com/golang/go/commit/2580d0e08d5e9f979b943758d3c49877fb2324cb).
Diffstat (limited to 'modules/structs')
-rw-r--r-- | modules/structs/issue.go | 8 | ||||
-rw-r--r-- | modules/structs/repo_file.go | 2 | ||||
-rw-r--r-- | modules/structs/repo_watch.go | 12 |
3 files changed, 11 insertions, 11 deletions
diff --git a/modules/structs/issue.go b/modules/structs/issue.go index a9fb6c6e79..1aec5cc6b8 100644 --- a/modules/structs/issue.go +++ b/modules/structs/issue.go @@ -140,10 +140,10 @@ const ( // IssueFormField represents a form field // swagger:model type IssueFormField struct { - Type IssueFormFieldType `json:"type" yaml:"type"` - ID string `json:"id" yaml:"id"` - Attributes map[string]interface{} `json:"attributes" yaml:"attributes"` - Validations map[string]interface{} `json:"validations" yaml:"validations"` + Type IssueFormFieldType `json:"type" yaml:"type"` + ID string `json:"id" yaml:"id"` + Attributes map[string]any `json:"attributes" yaml:"attributes"` + Validations map[string]any `json:"validations" yaml:"validations"` } // IssueTemplate represents an issue template for a repository diff --git a/modules/structs/repo_file.go b/modules/structs/repo_file.go index 48fcebe6f8..eb4f1c7dca 100644 --- a/modules/structs/repo_file.go +++ b/modules/structs/repo_file.go @@ -166,7 +166,7 @@ type FilesResponse struct { // FileDeleteResponse contains information about a repo's file that was deleted type FileDeleteResponse struct { - Content interface{} `json:"content"` // to be set to nil + Content any `json:"content"` // to be set to nil Commit *FileCommitResponse `json:"commit"` Verification *PayloadCommitVerification `json:"verification"` } diff --git a/modules/structs/repo_watch.go b/modules/structs/repo_watch.go index 2e89a9eefc..0d0b7c4ae0 100644 --- a/modules/structs/repo_watch.go +++ b/modules/structs/repo_watch.go @@ -9,10 +9,10 @@ import ( // WatchInfo represents an API watch status of one repository type WatchInfo struct { - Subscribed bool `json:"subscribed"` - Ignored bool `json:"ignored"` - Reason interface{} `json:"reason"` - CreatedAt time.Time `json:"created_at"` - URL string `json:"url"` - RepositoryURL string `json:"repository_url"` + Subscribed bool `json:"subscribed"` + Ignored bool `json:"ignored"` + Reason any `json:"reason"` + CreatedAt time.Time `json:"created_at"` + URL string `json:"url"` + RepositoryURL string `json:"repository_url"` } |