@@ -28,19 +28,22 @@ func helpFunc(commands map[string]cli.CommandFactory) string {
28
28
}
29
29
}
30
30
31
- var buf bytes.Buffer
32
- buf .WriteString ("usage: terraform [--version] [--help] <command> [args]\n \n " )
33
- buf .WriteString (
34
- "The available commands for execution are listed below.\n " +
35
- "The most common, useful commands are shown first, followed by\n " +
36
- "less common or more advanced commands. If you're just getting\n " +
37
- "started with Terraform, stick with the common commands. For the\n " +
38
- "other commands, please read the help and docs before usage.\n \n " )
39
- buf .WriteString ("Common commands:\n " )
40
- buf .WriteString (listCommands (porcelain , maxKeyLen ))
41
- buf .WriteString ("\n All other commands:\n " )
42
- buf .WriteString (listCommands (plumbing , maxKeyLen ))
43
- return buf .String ()
31
+ helpText := fmt .Sprintf (`
32
+ Usage: terraform [--version] [--help] <command> [args]
33
+
34
+ The available commands for execution are listed below.
35
+ The most common, useful commands are shown first, followed by
36
+ less common or more advanced commands. If you're just getting
37
+ started with Terraform, stick with the common commands. For the
38
+ other commands, please read the help and docs before usage.
39
+
40
+ Common commands:
41
+ %s
42
+ All other commands:
43
+ %s
44
+ ` , listCommands (porcelain , maxKeyLen ), listCommands (plumbing , maxKeyLen ))
45
+
46
+ return strings .TrimSpace (helpText )
44
47
}
45
48
46
49
// listCommands just lists the commands in the map with the
0 commit comments