diff options
author | Teddy Wing | 2023-11-25 15:02:45 +0100 |
---|---|---|
committer | Teddy Wing | 2023-11-25 15:02:45 +0100 |
commit | bfa9e0469e6e9cba2d03031a7fa602c7dbf44a7c (patch) | |
tree | 3e429f846bca07e2899e17f04f72c6af3a2151f1 | |
parent | 3c3533d85f55b034333e91edd9968608a1ea98ac (diff) | |
download | swextreload-bfa9e0469e6e9cba2d03031a7fa602c7dbf44a7c.tar.bz2 |
swextreload.reloadTab: Rename `letarget` variable
That was just a temporary name as I wasn't sure if I was going to keep
the argument. Now that this seems to work, rename the variable to
something more understandable.
-rw-r--r-- | internal/swextreload.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/internal/swextreload.go b/internal/swextreload.go index 5ed8765..93ab7fd 100644 --- a/internal/swextreload.go +++ b/internal/swextreload.go @@ -147,13 +147,13 @@ func reloadExtension( func reloadTab( ctx context.Context, extensionID string, - letarget *target.Info, + reloadTarget *target.Info, ) error { // Don't cancel the context. Otherwise, the background page DevTools // window closes. ctx, cancel := chromedp.NewContext(ctx) - isMV2 := isExtensionManifestV2(letarget) + isMV2 := isExtensionManifestV2(reloadTarget) logDebugf("Reload tab (Manifest V2: %t)", isMV2) // If the extension is Manifest V3, its `targetId` reset after we reloaded @@ -190,11 +190,14 @@ func reloadTab( ctx, cancel = chromedp.NewContext(ctx, chromedp.WithTargetID(targetID)) defer cancel() } else { - logDebugf("Connecting to target %s", letarget.TargetID) + logDebugf("Connecting to target %s", reloadTarget.TargetID) // Don't cancel the context. Otherwise, the background page DevTools // window closes. - ctx, _ = chromedp.NewContext(ctx, chromedp.WithTargetID(letarget.TargetID)) + ctx, _ = chromedp.NewContext( + ctx, + chromedp.WithTargetID(reloadTarget.TargetID), + ) } var tabsResp []byte |