Mirror of @tangled.org/core. Running on a Raspberry Pi Zero 2 (Please be gentle).
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

appview: apply gopls lints

- remove returns at end of function
- replace loop with copy

Signed-off-by: oppiliappan <me@oppi.li>

+1 -18
-1
appview/knots/knots.go
··· 378 378 } 379 379 380 380 w.Write([]byte(strings.Join(memberDids, "\n"))) 381 - return 382 381 } 383 382 384 383 // add member to domain, requires auth and requires invite access
-5
appview/pulls/pulls.go
··· 597 597 FilteringBy: state, 598 598 Stacks: stacks, 599 599 }) 600 - return 601 600 } 602 601 603 602 func (s *Pulls) PullComment(w http.ResponseWriter, r *http.Request) { ··· 1657 1658 } 1658 1659 1659 1660 s.pages.HxLocation(w, fmt.Sprintf("/%s/pulls/%d", f.OwnerSlashRepo(), pull.PullId)) 1660 - return 1661 1661 } 1662 1662 1663 1663 func (s *Pulls) resubmitStackedPullHelper( ··· 1900 1902 } 1901 1903 1902 1904 s.pages.HxLocation(w, fmt.Sprintf("/%s/pulls/%d", f.OwnerSlashRepo(), pull.PullId)) 1903 - return 1904 1905 } 1905 1906 1906 1907 func (s *Pulls) MergePull(w http.ResponseWriter, r *http.Request) { ··· 2070 2073 } 2071 2074 2072 2075 s.pages.HxLocation(w, fmt.Sprintf("/%s/pulls/%d", f.OwnerSlashRepo(), pull.PullId)) 2073 - return 2074 2076 } 2075 2077 2076 2078 func (s *Pulls) ReopenPull(w http.ResponseWriter, r *http.Request) { ··· 2138 2142 } 2139 2143 2140 2144 s.pages.HxLocation(w, fmt.Sprintf("/%s/pulls/%d", f.OwnerSlashRepo(), pull.PullId)) 2141 - return 2142 2145 } 2143 2146 2144 2147 func newStack(f *reporesolver.ResolvedRepo, user *oauth.User, targetBranch, patch string, pullSource *db.PullSource, stackId string) (db.Stack, error) {
-4
appview/repo/repo.go
··· 177 177 rp.pages.EditRepoDescriptionFragment(w, pages.RepoDescriptionParams{ 178 178 RepoInfo: f.RepoInfo(user), 179 179 }) 180 - return 181 180 } 182 181 183 182 func (rp *Repo) RepoDescription(w http.ResponseWriter, r *http.Request) { ··· 453 454 ArtifactMap: artifactMap, 454 455 DanglingArtifacts: danglingArtifacts, 455 456 }) 456 - return 457 457 } 458 458 459 459 func (rp *Repo) RepoBranches(w http.ResponseWriter, r *http.Request) { ··· 541 543 ShowRendered: showRendered, 542 544 RenderToggle: renderToggle, 543 545 }) 544 - return 545 546 } 546 547 547 548 func (rp *Repo) RepoBlobRaw(w http.ResponseWriter, r *http.Request) { ··· 584 587 585 588 w.Header().Set("Content-Type", "text/plain; charset=utf-8") 586 589 w.Write([]byte(result.Contents)) 587 - return 588 590 } 589 591 590 592 // modify the spindle configured for this repo
+1 -5
appview/spindles/spindles.go
··· 114 114 } 115 115 116 116 identsToResolve := make([]string, len(members)) 117 - for i, member := range members { 118 - identsToResolve[i] = member 119 - } 117 + copy(identsToResolve, members) 120 118 resolvedIds := s.IdResolver.ResolveIdents(r.Context(), identsToResolve) 121 119 didHandleMap := make(map[string]string) 122 120 for _, identity := range resolvedIds { ··· 256 258 257 259 // ok 258 260 s.Pages.HxRefresh(w) 259 - return 260 261 } 261 262 262 263 func (s *Spindles) delete(w http.ResponseWriter, r *http.Request) { ··· 708 711 709 712 // ok 710 713 s.Pages.HxRefresh(w) 711 - return 712 714 }
-3
appview/state/profile.go
··· 265 265 } 266 266 267 267 s.updateProfile(profile, w, r) 268 - return 269 268 } 270 269 271 270 func (s *State) UpdateProfilePins(w http.ResponseWriter, r *http.Request) { ··· 304 305 profile.PinnedRepos = pinnedRepos 305 306 306 307 s.updateProfile(profile, w, r) 307 - return 308 308 } 309 309 310 310 func (s *State) updateProfile(profile *db.Profile, w http.ResponseWriter, r *http.Request) { ··· 371 373 s.notifier.UpdateProfile(r.Context(), profile) 372 374 373 375 s.pages.HxRedirect(w, "/"+user.Did) 374 - return 375 376 } 376 377 377 378 func (s *State) EditBioFragment(w http.ResponseWriter, r *http.Request) {