quick update with global version access (#24)
* update for globally accesible version number * update * update * add flag * add flag --------- Co-authored-by: Matt Spurrier <matthew@senseict.com.au> Co-authored-by: HikariKnight <2557889+HikariKnight@users.noreply.github.com>
This commit is contained in:
parent
55bfb36522
commit
1f059e0a96
3 changed files with 12 additions and 8 deletions
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
internal "github.com/HikariKnight/quickpassthrough/internal"
|
||||
downloader "github.com/HikariKnight/quickpassthrough/internal/ls_iommu_downloader"
|
||||
|
@ -13,9 +14,13 @@ func main() {
|
|||
// Get all our arguments in 1 neat struct
|
||||
pArg := params.NewParams()
|
||||
|
||||
// Display the version
|
||||
if pArg.Flag["version"] {
|
||||
fmt.Printf("Quickpassthrough version: %s\n", version.Version)
|
||||
} else {
|
||||
fmt.Printf("QuickPassthrough Version %s\n", version.Version)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
if !pArg.Flag["gui"] {
|
||||
downloader.CheckLsIOMMU()
|
||||
internal.Tui()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue