summaryrefslogtreecommitdiff
path: root/caddy.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-07-15 17:33:47 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-07-15 17:33:47 -0600
commitbdf92ee84efa6b623698450553cb5509f1cfb66d (patch)
treec5bb95a7ebb8bf294c10be3496ab526c69e5876c /caddy.go
parentf2171812931114dc48a9d27122a8479af8b2c8f3 (diff)
Minor tweaks
Diffstat (limited to 'caddy.go')
-rw-r--r--caddy.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/caddy.go b/caddy.go
index 21f733c..5a5349e 100644
--- a/caddy.go
+++ b/caddy.go
@@ -208,8 +208,8 @@ func (d *Duration) UnmarshalJSON(b []byte) error {
// If no version information is available, a non-nil
// value will still be returned, but with an
// unknown version.
-func GoModule() *debug.Module {
- mod := &debug.Module{Version: "unknown"}
+func GoModule() debug.Module {
+ mod := debug.Module{Version: "unknown"}
bi, ok := debug.ReadBuildInfo()
if ok {
mod.Path = bi.Main.Path
@@ -219,9 +219,10 @@ func GoModule() *debug.Module {
// once that issue is fixed, we should just be able to use bi.Main... hopefully.
for _, dep := range bi.Deps {
if dep.Path == mod.Path {
- return dep
+ return *dep
}
}
+ return bi.Main
}
return mod
}