Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor NetworkManager.onLoadingFinished #1084

Merged
merged 3 commits into from
Oct 26, 2023

Conversation

inancgumus
Copy link
Member

@inancgumus inancgumus commented Oct 26, 2023

What?

Refactors NetworkManager.onLoadingFinished to fix linter warnings.

Why?

This is before fixing bug #1072. Otherwise, We'd have to do the refactoring in #1078.

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

Related: #1078

@inancgumus inancgumus force-pushed the refactor/nm-onLoadingFinished branch from 01f0eef to 93ca042 Compare October 26, 2023 08:33
Copy link
Collaborator

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

Just some minor comments about the code comments 🙂

common/network_manager.go Outdated Show resolved Hide resolved
common/network_manager.go Outdated Show resolved Hide resolved
common/network_manager_test.go Show resolved Hide resolved
Co-authored-by: Ankur <ankur.agarwal@grafana.com>
Copy link
Collaborator

@ka3de ka3de left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@@ -347,37 +347,52 @@ func (m *NetworkManager) onLoadingFailed(event *network.EventLoadingFailed) {
}

func (m *NetworkManager) onLoadingFinished(event *network.EventLoadingFinished) {
req := m.requestFromID(event.RequestID)
rid := event.RequestID
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/rid/reqID ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, too long :) It feels more idiomatic to use rid. Thanks for the suggestion, though.

@inancgumus inancgumus merged commit fe54da2 into v1.1.1-branch Oct 26, 2023
12 checks passed
@inancgumus inancgumus deleted the refactor/nm-onLoadingFinished branch October 26, 2023 14:18
@inancgumus inancgumus restored the refactor/nm-onLoadingFinished branch October 26, 2023 14:20
@inancgumus inancgumus deleted the refactor/nm-onLoadingFinished branch October 26, 2023 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants