| 38 | namespace process { |
| 39 | |
| 40 | string HELP( |
| 41 | const string& tldr, |
| 42 | const Option<string>& description, |
| 43 | const Option<string>& authentication, |
| 44 | const Option<string>& authorization, |
| 45 | const Option<string>& references) |
| 46 | { |
| 47 | // Construct the help string. |
| 48 | string help = |
| 49 | "### TL;DR; ###\n" + |
| 50 | tldr; |
| 51 | |
| 52 | if (!strings::endsWith(help, "\n")) { |
| 53 | help += "\n"; |
| 54 | } |
| 55 | |
| 56 | if (description.isSome()) { |
| 57 | help += |
| 58 | "\n" |
| 59 | "### DESCRIPTION ###\n" + |
| 60 | description.get(); |
| 61 | } |
| 62 | |
| 63 | if (authentication.isSome()) { |
| 64 | help += |
| 65 | "\n" |
| 66 | "### AUTHENTICATION ###\n" + |
| 67 | authentication.get(); |
| 68 | } |
| 69 | |
| 70 | if (authorization.isSome()) { |
| 71 | help += |
| 72 | "\n" |
| 73 | "### AUTHORIZATION ###\n" + |
| 74 | authorization.get(); |
| 75 | } |
| 76 | |
| 77 | if (!strings::endsWith(help, "\n")) { |
| 78 | help += "\n"; |
| 79 | } |
| 80 | |
| 81 | if (references.isSome()) { |
| 82 | help += "\n"; |
| 83 | help += references.get(); |
| 84 | } |
| 85 | |
| 86 | return help; |
| 87 | } |
| 88 | |
| 89 | |
| 90 | Help::Help(const Option<string>& _delegate) |
no test coverage detected