Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 13, 13:00 UTC
cmd: Enhance some help text
Matthew Holt committed
Sep 6, 2022 at 14:19 UTC
1c9c8f6a13f99817cb35a9b100287da81255be21
1 file changed
+35
-2
cmd/commands.go
+35
-2
@@ -200,6 +200,19 @@ config file; otherwise the default is assumed.`,
200
Name: "version",
201
Func: cmdVersion,
202
Short: "Prints the version",
203
+ Long: `
204
+Prints the version of this Caddy binary.
205
+
206
+Version information must be embedded into the binary at compile-time in
207
+order for Caddy to display anything useful with this command. If Caddy
208
+is built from within a version control repository, the Go command will
209
+embed the revision hash if available. However, if Caddy is built in the
210
+way specified by our online documentation (or by using xcaddy), more
211
+detailed version information is printed as given by Go modules.
212
+
213
+For more details about the full version string, see the Go module
214
+documentation: https://go.dev/doc/modules/version-numbers
215
+`,
216
})
217
218
RegisterCommand(Command{
@@ -226,6 +239,24 @@ config file; otherwise the default is assumed.`,
239
Name: "environ",
240
Func: cmdEnviron,
241
Short: "Prints the environment",
242
+ Long: `
243
+Prints the environment as seen by this Caddy process.
244
+
245
+The environment includes variables set in the system. If your Caddy
246
+configuration uses environment variables (e.g. "{env.VARIABLE}") then
247
+this command can be useful for verifying that the variables will have
248
+the values you expect in your config.
249
+
250
+Note that environments may be different depending on how you run Caddy.
251
+Environments for Caddy instances started by service managers such as
252
+systemd are often different than the environment inherited from your
253
+shell or terminal.
254
+
255
+You can also print the environment the same time you use "caddy run"
256
+by adding the "--environ" flag.
257
+
258
+Environments may contain sensitive data.
259
+`,
260
})
261
262
RegisterCommand(Command{
@@ -367,9 +398,11 @@ EXPERIMENTAL: May be changed or removed.
398
Usage: "--directory <path>",
399
Short: "Generates the manual pages for Caddy commands",
400
Long: `
370
-Generates the manual pages for Caddy commands into the designated directory tagged into section 8 (System Administration).
401
+Generates the manual pages for Caddy commands into the designated directory
402
+tagged into section 8 (System Administration).
403
372
-The manual page files are generated into the directory specified by the argument of --directory. If the directory does not exist, it will be created.
404
+The manual page files are generated into the directory specified by the
405
+argument of --directory. If the directory does not exist, it will be created.
406
`,
407
Flags: func() *flag.FlagSet {
408
fs := flag.NewFlagSet("manpage", flag.ExitOnError)