From 413b443877a4a3f4c4030a0a5d15f65d3847668d Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Sun, 2 Sep 2018 00:06:41 +0100 Subject: [PATCH] add list-colours command and edit error message in parseColour. --- SmoulderingBeachBallCLI/ConsoleCommands.fs | 6 ++++++ SmoulderingBeachBallCLI/Validation.fs | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/SmoulderingBeachBallCLI/ConsoleCommands.fs b/SmoulderingBeachBallCLI/ConsoleCommands.fs index 16322be..7f29928 100644 --- a/SmoulderingBeachBallCLI/ConsoleCommands.fs +++ b/SmoulderingBeachBallCLI/ConsoleCommands.fs @@ -29,3 +29,9 @@ showEndOfCommandMessage + let ``list-colours`` () = + printfn "[INFO.] Listing available colours..." + for item in colourList do + printfn "%s" item.Key + showEndOfCommandMessage + diff --git a/SmoulderingBeachBallCLI/Validation.fs b/SmoulderingBeachBallCLI/Validation.fs index e2912e8..c9963f8 100644 --- a/SmoulderingBeachBallCLI/Validation.fs +++ b/SmoulderingBeachBallCLI/Validation.fs @@ -1,4 +1,4 @@ -module Validation +module internal Validation open System.Drawing open SmoulderingBeachBall.Domain.DomainTypes @@ -25,7 +25,7 @@ colourList |> Map.find (colour.ToLower()) | false -> - invalidArg "Colour" "The colour specifed cannot is invalid." + invalidArg "Colour" "The colour specifed is invalid." // "Please use the ListAvailableColours command for a list"? let buildBasicSpec iWidth iHeight mainColour path =