Skip to content

Commit

Permalink
ref: rename config pkg to version
Browse files Browse the repository at this point in the history
It only houses version info anyway.
  • Loading branch information
tjhop committed Apr 9, 2024
1 parent e6a23e8 commit ad2178b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions cmd/mango/mango.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (

"github.com/tjhop/mango/pkg/utils"

"github.com/tjhop/mango/internal/config"
"github.com/tjhop/mango/internal/inventory"
"github.com/tjhop/mango/internal/manager"
"github.com/tjhop/mango/internal/version"
)

const (
Expand Down Expand Up @@ -62,9 +62,9 @@ func init() {
Name: "mango_build_info",
Help: "A metric with a constant '1' value with labels for version, commit and build_date from which mango was built.",
ConstLabels: prometheus.Labels{
"version": config.Version,
"commit": config.Commit,
"build_date": config.BuildDate,
"version": version.Version,
"commit": version.Commit,
"build_date": version.BuildDate,
"goversion": runtime.Version(),
},
},
Expand Down Expand Up @@ -549,9 +549,9 @@ func main() {
slog.LevelInfo,
"Mango build information",
slog.Group("build",
slog.String("version", config.Version),
slog.String("build_date", config.BuildDate),
slog.String("commit", config.Commit),
slog.String("version", version.Version),
slog.String("build_date", version.BuildDate),
slog.String("commit", version.Commit),
slog.String("go_version", runtime.Version()),
),
)
Expand Down
2 changes: 1 addition & 1 deletion internal/config/version.go → internal/version/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package config
package version

var (
Version string // will be populated by linker during `go build`
Expand Down

0 comments on commit ad2178b

Please sign in to comment.