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](2580d0e08d).
This commit is contained in:
silverwind 2023-07-04 20:36:08 +02:00 committed by GitHub
parent 00dbba7f42
commit 88f835192d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
233 changed files with 727 additions and 727 deletions

View file

@ -25,7 +25,7 @@ import (
packages_service "code.gitea.io/gitea/services/packages"
)
func jsonResponse(ctx *context.Context, status int, obj interface{}) {
func jsonResponse(ctx *context.Context, status int, obj any) {
resp := ctx.Resp
resp.Header().Set("Content-Type", "application/vnd.pub.v2+json")
resp.WriteHeader(status)
@ -34,7 +34,7 @@ func jsonResponse(ctx *context.Context, status int, obj interface{}) {
}
}
func apiError(ctx *context.Context, status int, obj interface{}) {
func apiError(ctx *context.Context, status int, obj any) {
type Error struct {
Code string `json:"code"`
Message string `json:"message"`
@ -60,10 +60,10 @@ type packageVersions struct {
}
type versionMetadata struct {
Version string `json:"version"`
ArchiveURL string `json:"archive_url"`
Published time.Time `json:"published"`
Pubspec interface{} `json:"pubspec,omitempty"`
Version string `json:"version"`
ArchiveURL string `json:"archive_url"`
Published time.Time `json:"published"`
Pubspec any `json:"pubspec,omitempty"`
}
func packageDescriptorToMetadata(baseURL string, pd *packages_model.PackageDescriptor) *versionMetadata {