clean up some compiler errors
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/lib/mix/tasks/ovh.ex b/lib/mix/tasks/ovh.ex
index 5256a21..732121e 100644
--- a/lib/mix/tasks/ovh.ex
+++ b/lib/mix/tasks/ovh.ex
@@ -186,25 +186,21 @@ defmodule Mix.Tasks.Ovh do
{acc, _index, _max} =
Enum.reduce(inputs, {"", 1, Enum.count(inputs)}, fn({"input", input, _}, acc) ->
name = :proplists.get_value("name", input)
- value = ""
+ value =
case name do
- "nic" ->
- value = login
- "password" ->
- value = password
- "applicationName" ->
- value = opts_map.application_name
- "applicationDescription" ->
- value = opts_map.application_description
- _ ->
- raise "Unexpected input"
+ "nic" -> login
+ "password" -> password
+ "applicationName" -> opts_map.application_name
+ "applicationDescription" -> opts_map.application_description
+ _ -> raise "Unexpected input"
end
param = name <> "=" <> value
{acc, index, max} = acc
+ acc =
if index == max do
- acc = acc <> param
+ acc <> param
else
- acc = acc <> param <> "&"
+ acc <> param <> "&"
end
{acc, index + 1, max}
end)