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

Why not initialization? #28

Closed
frederikhors opened this issue Dec 6, 2020 · 3 comments
Closed

Why not initialization? #28

frederikhors opened this issue Dec 6, 2020 · 3 comments

Comments

@frederikhors
Copy link

@gislik in #17 wrote:

Since no object is instantiated the code is not type-safe, i.e. two thread may try to add sanitizers at the same time resulting in a corrupt state.

Can we instantiate an object?

Can we use it like:

func main() {
  sanitizer := conform.New()
  conform.AddSanitizer(customOne)

  sanitizer.String(...)
}

Why not?

We're using dependency injection everywhere...

@leebenson
Copy link
Owner

Why not?

This is a good idea for a feature, but not one I had in mind when I created this library.

My last personal commit was almost 5 years ago now, and I'm not actively maintaining this.

I'd happily accept a PR.

@frederikhors
Copy link
Author

My last personal commit was almost 5 years ago now, and I'm not actively maintaining this.

Why? Do you use something else?

@leebenson
Copy link
Owner

The same reason most people stop maintaining a library -- it no longer applies to my work.

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

No branches or pull requests

2 participants