mediocregopher / radix.v2

Redis client for Go
http://godoc.org/github.com/mediocregopher/radix.v2
MIT License
433 stars 92 forks source link

add redis info helper funcs #29

Closed Akagi201 closed 8 years ago

Akagi201 commented 8 years ago

Add two helper functions to make parsing redis-cli info redis-cli info <section> result more simpler.

BuildAllInfoMap: parse the result of info all BuildMapFromInfoString: parse the result of info <section>

mediocregopher commented 8 years ago

Hi @Akagi201! First I wanna say thanks for putting in the work and contributing to radix! Unfortunately I don't think these functions quite fit with the rest of the project. the util package is more for tasks which are commonly needed but are kind of annoying to implement. While parsing the info would certainly be annoying to implement everytime, I don't feel like it's very commonly needed.

With that said, I think your code would work great as its own standalone library package. They don't need to use any radix specific things, in fact if they just take in strings they can be completely driver agnostic, and would potentially find more use that way.

Again, sorry to be a bummer, your code is definitely useful but I feel this isn't the right place for it to live. Please don't be discouraged from contributing in the future, although maybe open an issue first so we can talk about what all you're trying to do :)

Akagi201 commented 8 years ago

@mediocregopher OK. Thanks for your long reply. I agree with you.

Akagi201 commented 8 years ago

I leave the codes here. https://github.com/Akagi201/radixutil

mediocregopher commented 8 years ago

Very nice, thanks for following up!