build/maintner
Dmitri Shuralyov b316f9106a maintner: simplify slice deletion in setAssigneesFromProto
Usually when code can be simplified, there's not much to say to motivate
the change other than "the code is now simpler". In this case there were
two additional motivating reasons for this particular change.

First, because it removes the panic possibility in setAssigneesFromProto
if the provided toDelete results in a idxsToDelete not in a descending
order as it's documented and needs to be. I ran into it while running
devapp locally, though somehow it seems not to happen in production...
Anyway, this logic can now be written in a much simpler way, one that
doesn't require the existing and toDelete slice order to intersect in
a very particular way, so do that.

Second, because I wanted to learn more about the latest Go 1.21 release
by playing a bit with it, and what better place to do it than x/build.
Though I ended up realizing slices is also available in a newer x/exp,
and so it was easier to keep it compatible rather than taking advantage
of x/build being exempt from the Go release policy.

Change-Id: Ida79399a7898dd652704772ea088b3b0d8a44a57
Reviewed-on: https://go-review.googlesource.com/c/build/+/517715
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2023-08-11 19:49:48 +00:00
..
cmd/maintserve maintner/cmd/maintserve: update dependencies and Go version 2023-08-10 19:26:52 +00:00
godata maintner: retry network operations that may fail in getNewSegments 2022-06-29 21:39:37 +00:00
internal/robustio all: gofmt 2022-04-12 02:01:23 +00:00
maintnerd cmd/gopherbot,devapp,maintner: update to 1.20 and Bookworm 2023-07-14 19:58:49 +00:00
maintpb all: gofmt 2022-04-12 02:01:23 +00:00
maintq all: converge GRPC usage to a single version 2022-03-17 15:12:59 +00:00
maintwatch all: add or change GoDoc badge to pkg.go.dev with update-readmes.go 2020-12-15 04:52:31 +00:00
reclog all: add or change GoDoc badge to pkg.go.dev with update-readmes.go 2020-12-15 04:52:31 +00:00
testdata maintner: increase test coverage for github.go and maintner.go 2019-10-02 16:22:21 +00:00
README.md all: add or change GoDoc badge to pkg.go.dev with update-readmes.go 2020-12-15 04:52:31 +00:00
example_test.go maintner: add examples 2017-12-19 22:08:30 +00:00
gerrit.go all: correct typo and grammar issues in comments 2023-02-21 15:14:29 +00:00
gerrit_test.go maintner: handle multi-line subject edge-case 2019-02-11 18:03:06 +00:00
git.go all: gofmt 2022-04-12 02:01:23 +00:00
git_test.go maintner: fix tests 2017-03-31 01:06:28 +00:00
github.go maintner: simplify slice deletion in setAssigneesFromProto 2023-08-11 19:49:48 +00:00
github_test.go maintner: discard lock_reason in GitHub issue events 2021-05-17 23:52:31 +00:00
logger.go maintner: support for updating corpus in-place from its mutation source 2017-04-30 21:30:16 +00:00
maintner.go all: correct typo and grammar issues in comments 2023-02-21 15:14:29 +00:00
maintner_go120.go maintner: simplify slice deletion in setAssigneesFromProto 2023-08-11 19:49:48 +00:00
maintner_go121.go maintner: simplify slice deletion in setAssigneesFromProto 2023-08-11 19:49:48 +00:00
maintner_test.go maintner: don't generate no-op github issue mutations on empty bodies 2019-12-05 17:34:07 +00:00
netsource.go maintner: don't try to download negative bytes 2022-06-29 21:39:38 +00:00
netsource_test.go maintner: don't try to download negative bytes 2022-06-29 21:39:38 +00:00
subscribe.go maintnerd: subscribe to pubsubhelper 2017-04-06 15:19:04 +00:00

README.md

Go Reference

golang.org/x/build/maintner

Package maintner mirrors, searches, syncs, and serves Git, Github, and Gerrit metadata.