treewide: cleanup function receiver names
Change-Id: I0575175ea249a2bd39b4b7769e49a9995fae6f6d
Reviewed-on: https://review.monogon.dev/c/monogon/+/2959
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/metropolis/node/build/mkerofs/main.go b/metropolis/node/build/mkerofs/main.go
index 9cacc59..ac0042a 100644
--- a/metropolis/node/build/mkerofs/main.go
+++ b/metropolis/node/build/mkerofs/main.go
@@ -128,7 +128,7 @@
// pathRef gets the entrySpec at the leaf of the given path, inferring
// directories if necessary
-func (s *entrySpec) pathRef(p string) *entrySpec {
+func (spec *entrySpec) pathRef(p string) *entrySpec {
// This block gets a path array starting at the root of the filesystem. The
// root folder is the zero-length array.
pathParts := strings.Split(path.Clean("./"+p), "/")
@@ -136,7 +136,7 @@
pathParts = pathParts[1:]
}
- entryRef := s
+ entryRef := spec
for _, part := range pathParts {
childRef, ok := entryRef.children[part]
if !ok {
diff --git a/metropolis/node/core/rpc/resolver/watcher.go b/metropolis/node/core/rpc/resolver/watcher.go
index 121d731..d2715b6 100644
--- a/metropolis/node/core/rpc/resolver/watcher.go
+++ b/metropolis/node/core/rpc/resolver/watcher.go
@@ -109,16 +109,16 @@
}
}
-func (r *clientWatcher) ResolveNow(_ resolver.ResolveNowOptions) {
+func (w *clientWatcher) ResolveNow(_ resolver.ResolveNowOptions) {
// No-op. The clientWatcher's watcher runs as fast as possible.
}
-func (r *clientWatcher) Close() {
+func (w *clientWatcher) Close() {
select {
- case <-r.resolver.ctx.Done():
- case r.resolver.reqC <- &request{
+ case <-w.resolver.ctx.Done():
+ case w.resolver.reqC <- &request{
unsub: &requestUnsubscribe{
- id: r.subscription.id,
+ id: w.subscription.id,
},
}:
}