Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add golang information to the --version output #452

Merged
merged 2 commits into from
Jul 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions internal/cli/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cli
import (
"fmt"
"os"
"runtime"
"strconv"

providerConfig "github.com/kairos-io/provider-kairos/v2/internal/provider/config"
Expand Down Expand Up @@ -95,6 +96,11 @@ The validate command expects a configuration file as its only argument. Local fi

func Start() error {
toolName := "kairos"

cli.VersionPrinter = func(cCtx *cli.Context) {
jimmykarily marked this conversation as resolved.
Show resolved Hide resolved
fmt.Printf("version: %s, compiled with: %s\n", VERSION, runtime.Version())
}

app := &cli.App{
Name: toolName,
Version: VERSION,
Expand Down