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

Breaking files of the main package makes it difficult to test using `go run` #4493

Closed
krasi-georgiev opened this Issue Aug 13, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@krasi-georgiev
Copy link
Member

krasi-georgiev commented Aug 13, 2018

Proposal

Use case. Why is this important?
Run and debug Prometheus locally.
It is important so that we can debug quickly :)

I wish we could organise the files so that the cmd/prometheus/ contains only main.go and main_test.go so that I can run and debug only using go run main.go.

currently we have so many files in there so that it is no easy to follow which files need to be passed to the go run command.

I guess that mean putting all the other files in their dedicated packages which seems the idiomatic go way anyway.

@roidelapluie

This comment has been minimized.

Copy link
Contributor

roidelapluie commented Aug 13, 2018

is go run *.go such a big deal?

@krasi-georgiev

This comment has been minimized.

Copy link
Member Author

krasi-georgiev commented Aug 13, 2018

I wish it was that easy :)
this picks up the main_test.go and fails. I tried many different combinations and nothing worked.

opening a PR in a sec as this was very easy to fix by moving these in a dedicated package.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 22, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 22, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.