-
Notifications
You must be signed in to change notification settings - Fork 340
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
Add globbing support #38
Conversation
Hi! is there any reason |
Hi! I guess I didn't think about using it just because I'm comparing 2 strings not paths. But path.Match does make more sense in the way it handles globs. |
I actually started using this today and as the go |
@@ -41,6 +41,11 @@ func New(address string) (*Client, error) { | |||
return NewForUser(address, username) | |||
} | |||
|
|||
// Return a New Client with auto config | |||
func AutoConfigClient() (*Client, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than a new method, let's just have this be default fallback behavior for New
if an empty string is passed for the namenode.
Regarding globs: I don't really see the benefit to including globs in the library, since the command line client already supports them and they're really a bash thing. I'd cite that there's no equivalent method in the go I'm interested in this config loading stuff, though! Thanks so much for being willing to contribute, it really makes my day whenever there's a PR on this project. |
Port int | ||
} | ||
|
||
type nameNodeError struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need for this to be a struct. it can just be var ErrUnresolvedNamenode = errors.New("Couldn't find a namenode address in any config.")
This is loosely based on the snakebite glob support.