Closed doorisajar closed 2 years ago
This is concise at the expense of clarity, but it does the job. For example:
pairs = [Pair("--build-arg", "arg1"), Pair("--build-arg", "arg2")]; options = ["--rm", "--iidfile", "id", "--tag"]; [push!(options, e) for e in map(x -> [first(x), last(x)], pairs) |> x -> reduce(vcat, x)]; options # 8-element Vector{String}: # "--rm" # "--iidfile" # "id" # "--tag" # "--build-arg" # "arg1" # "--build-arg" # "arg2"
This is concise at the expense of clarity, but it does the job. For example: