-
-
Notifications
You must be signed in to change notification settings - Fork 36
apply glob pattern via Path parameter. #74
base: master
Are you sure you want to change the base?
Conversation
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.
@nayasis Thank you for the PR.
It almost looks great!
I just have some comments related to the code format.
If you have time, you can address these comments.
Otherwise, I will fix that then merge this PR.
Thanks!
|
||
fun String.glob(): List<String> { | ||
|
||
if( ! this.startsWith("glob:") ) return listOf(this) |
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.
It is better if we format code to make all the code same style.
On the Intellij Idea you can press Ctrl + Alt + L
to format code.
|
||
val pattern = this.removePrefix("glob:") | ||
|
||
var root = pattern |
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.
Perfer to use val
than var
if possible.
listOf(this) | ||
} | ||
|
||
} |
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.
We should add blank line at the end of file to remove this warning from github.
(Some IDE has this setting. On Intellij IDEA, we have a setting: Ensure blank line at the end when save file).
ex.
$ java -jar /path/to/restcli.jar -e "test" glob:*.http