summaryrefslogtreecommitdiff
path: root/cmd/commandfuncs.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2021-01-16 12:52:33 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2021-01-16 12:52:33 -0700
commit8f6f9865d49d044e2fdc5e97bb0cc4fac155162e (patch)
tree9ae3395a71c4cc7ff675c2ce942e74c0393b35b8 /cmd/commandfuncs.go
parent58e83a811bce9a4f2bad0c3460939c54848becdf (diff)
cmd: Print more detailed version with --environ
Diffstat (limited to 'cmd/commandfuncs.go')
-rw-r--r--cmd/commandfuncs.go14
1 files changed, 1 insertions, 13 deletions
diff --git a/cmd/commandfuncs.go b/cmd/commandfuncs.go
index 1ee7dd8..bf24c24 100644
--- a/cmd/commandfuncs.go
+++ b/cmd/commandfuncs.go
@@ -336,19 +336,7 @@ func cmdReload(fl Flags) (int, error) {
}
func cmdVersion(_ Flags) (int, error) {
- goModule := caddy.GoModule()
- fmt.Print(goModule.Version)
- if goModule.Sum != "" {
- // a build with a known version will also have a checksum
- fmt.Printf(" %s", goModule.Sum)
- }
- if goModule.Replace != nil {
- fmt.Printf(" => %s", goModule.Replace.Path)
- if goModule.Replace.Version != "" {
- fmt.Printf(" %s", goModule.Replace.Version)
- }
- }
- fmt.Println()
+ fmt.Println(caddyVersion())
return caddy.ExitCodeSuccess, nil
}