add flag
This commit is contained in:
parent
feeae00f74
commit
317c550cf2
2 changed files with 4 additions and 2 deletions
|
@ -20,7 +20,7 @@ builds:
|
||||||
- amd64
|
- amd64
|
||||||
mod_timestamp: "{{ .CommitTimestamp }}"
|
mod_timestamp: "{{ .CommitTimestamp }}"
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X version.Version={{.Version}}
|
- -s -w -X github.com/HikariKnight/quickpassthrough/internal/version.Version={{.Version}}
|
||||||
archives:
|
archives:
|
||||||
- format: tar.gz
|
- format: tar.gz
|
||||||
# this name template makes the OS and Arch compatible with the results of `uname`.
|
# this name template makes the OS and Arch compatible with the results of `uname`.
|
||||||
|
|
|
@ -2,11 +2,12 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
|
|
||||||
internal "github.com/HikariKnight/quickpassthrough/internal"
|
internal "github.com/HikariKnight/quickpassthrough/internal"
|
||||||
downloader "github.com/HikariKnight/quickpassthrough/internal/ls_iommu_downloader"
|
downloader "github.com/HikariKnight/quickpassthrough/internal/ls_iommu_downloader"
|
||||||
"github.com/HikariKnight/quickpassthrough/internal/params"
|
"github.com/HikariKnight/quickpassthrough/internal/params"
|
||||||
version "github.com/HikariKnight/quickpassthrough/internal/version"
|
"github.com/HikariKnight/quickpassthrough/internal/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -16,6 +17,7 @@ func main() {
|
||||||
// Display the version
|
// Display the version
|
||||||
if pArg.Flag["version"] {
|
if pArg.Flag["version"] {
|
||||||
fmt.Printf("QuickPassthrough Version %s\n", version.Version)
|
fmt.Printf("QuickPassthrough Version %s\n", version.Version)
|
||||||
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !pArg.Flag["gui"] {
|
if !pArg.Flag["gui"] {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue