Using a deprecated function, variable, constant or field GO-W1009
Anti-pattern
Major
2 months agoa year old
c.Repo.Repository.APIFormatLegacy is deprecated: Use APIFormat instead.
146		Ref:        branchName,
147		RefType:    "branch",
148		PusherType: api.PUSHER_TYPE_USER,
149		Repo:       c.Repo.Repository.APIFormatLegacy(nil),150		Sender:     c.User.APIFormat(),
151	}); err != nil {
152		log.Error("Failed to prepare webhooks for %q: %v", database.HOOK_EVENT_DELETE, err)
database.RepoPath is deprecated: Use repoutil.RepositoryPath instead.
35}
36
37func GetArchive(c *context.APIContext) {
38	repoPath := database.RepoPath(c.Params(":username"), c.Params(":reponame"))39	gitRepo, err := git.Open(repoPath)
40	if err != nil {
41		c.Error(err, "open repository")
strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead.
173			log.Fatal("Failed to init %s logger: %v", mode, err)
174			return
175		}
176		log.Trace("Log mode: %s (%s)", strings.Title(mode), strings.Title(strings.ToLower(level.String())))177	}
178
179	// ⚠️ WARNING: It is only safe to remove the primary logger until
strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead.
173			log.Fatal("Failed to init %s logger: %v", mode, err)
174			return
175		}
176		log.Trace("Log mode: %s (%s)", strings.Title(mode), strings.Title(strings.ToLower(level.String())))177	}
178
179	// ⚠️ WARNING: It is only safe to remove the primary logger until