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: extract 'LeakCheckConfiguration' #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 15, 2020

  1. refactor: extract 'LeakCheckConfiguration'

    This struct stores the slice of 'RoutinesSafeToIgnore' that are used as filters
    in `interestingGoroutines`.
    
    All package public functions for checking now immediately delegate to the
    `DefaultCheckConfiguration` which has the previous hard-coded list of values.
    
    This provides an extension point where a consumer of the library can extend the
    routines which are safe to ignore (i.e. explicitly allow a certain goroutine to
    leak) by either copying the DefaultCheckConfiguration and adding their own
    values (ideal), or by simply mutating the default value (less ideal).
    kjgorman committed Oct 15, 2020
    Configuration menu
    Copy the full SHA
    3a134b2 View commit details
    Browse the repository at this point in the history