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

allow customizing file prefixes to be ignored #6

Closed
wants to merge 1 commit into from
Closed

allow customizing file prefixes to be ignored #6

wants to merge 1 commit into from

Conversation

kdomanski
Copy link

No description provided.

for i := 0; i < 10; i++ {
pc, file, line = getCaller(skip + i)
if !strings.HasPrefix(file, "logrus/") {
break
for _, prefix := range prefixes {
Copy link
Owner

@onrik onrik Aug 31, 2018

Choose a reason for hiding this comment

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

I think will be better to use map here.

Copy link
Author

Choose a reason for hiding this comment

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

Use how? Do you mean change Prefixes []string to Prefixes map[string]struct{} and use it as a set?

Copy link
Owner

Choose a reason for hiding this comment

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

Yes.

Copy link
Author

Choose a reason for hiding this comment

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

Done.

@kdomanski
Copy link
Author

@onrik I've made the requested change.

@onrik
Copy link
Owner

onrik commented Oct 9, 2018

Fixed in c984981

@onrik onrik closed this Oct 9, 2018
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.

2 participants