Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
prefix() proposal. Closes broadinstitute/cromwell#375 #84
Conversation
mcovarr
referenced
this pull request
in broadinstitute/cromwell
Jan 10, 2017
Closed
Support additional Docker configuration options. #375
|
I also like the idea of having an And we could still have |
cjllanwarne
approved these changes
Jan 12, 2017
Like @Horneth I can see the value of a bumper all-in-one mkString(prefix: String, separator: String, suffix: String, array: Array[String]) which might make this redundant. But this still looks good to me
| @@ -94,6 +94,7 @@ | ||
| * [Array\[Array\[X\]\] transpose(Array\[Array\[X\]\])](#arrayarrayx-transposearrayarrayx) | ||
| * [Pair(X,Y) zip(X,Y)](#pairxy-zipxy) | ||
| * [Pair(X,Y) cross(X,Y)](#pairxy-crossxy) | ||
| + * [String prefix(String, Array\[String\])](#string-prefix-string-arraystring) |
mcovarr
Jan 12, 2017
Contributor
Whoops, that's because I have a superflous dash. Thank you for reviewing so thoroughly!
| + | ||
| +``` | ||
| +Array[String] env = ["key1=value1", "key2=value2", "key3=value3"] | ||
| +String env_param = prefix(" -e ", env) # " -e key1=value1 -e key2=value2 -e key3=value3" |
|
@cjllanwarne a Scala-esque Having said that I'm happy to make |
|
@mcovarr good point! I think |
mcovarr commentedJan 9, 2017
•
edited
This is an attempt to solve the problem presented here of composing a string from a prefix string and a list of zero or more value strings. There are definitely a lot of ways this problem might be solved and this is a concrete proposal just to get a discussion started.😄
Pinging @slnovak @vdauwera @knoblett @katevoss @jsotobroad @LeeTL1220 @yfarjoun