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

reduced the number of init() calls and references to staging #1481

Merged
merged 3 commits into from
Jan 29, 2025

Conversation

reflog
Copy link
Contributor

@reflog reflog commented Jan 20, 2025

mostly the reason for this cleanup is - our over-use of init() function causes extra logs to leak out before Flashlight is actually initialized

oh, and I removed references to Staging, since... it doesn't exist.

@reflog reflog requested review from garmr-ulfr and hwh33 January 20, 2025 16:01
common/const.go Outdated
}
forceAds, _ = strconv.ParseBool(os.Getenv("FORCEADS"))
}
var forceAds, _ = strconv.ParseBool(os.Getenv("FORCEADS"))
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this can also be removed with the function below, I don't see any reference or usage (it looks like the same file exists in lantern-client internalsdk/common/const.go and also is not being used)

Copy link
Contributor

Choose a reason for hiding this comment

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

probably this whole package shouldn't exist, this definitions are only used at specific packages and most stuff is unused

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed forceads can go

Copy link
Contributor

@myleshorton myleshorton left a comment

Choose a reason for hiding this comment

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

LGTM!

@reflog reflog merged commit f301fb5 into main Jan 29, 2025
3 checks passed
@reflog reflog deleted the reflog/late-init branch January 29, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants