MCPcopy Create free account
hub / github.com/apache/mesos / HELP

Function HELP

3rdparty/libprocess/src/help.cpp:40–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38namespace process {
39
40string 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
90Help::Help(const Option<string>& _delegate)

Callers 15

TOGGLE_HELPMethod · 0.85
START_HELPMethod · 0.85
STOP_HELPMethod · 0.85
START_HELPMethod · 0.85
STOP_HELPMethod · 0.85
DOWNLOAD_RAW_HELPMethod · 0.85
DOWNLOAD_TEXT_HELPMethod · 0.85
DOWNLOAD_GRAPH_HELPMethod · 0.85
STATISTICS_HELPMethod · 0.85
STATE_HELPMethod · 0.85
helpMethod · 0.85
statsHelpMethod · 0.85

Calls 3

endsWithFunction · 0.85
isSomeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected