Skip to content

Commit

Permalink
Added version number to the arguments.
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h committed Sep 24, 2020
1 parent a7b37b0 commit 109eab1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import (
"golang.org/x/text/transform"
)

var version string

type ClientCertPrefix string

func (cc ClientCertPrefix) fileName() string {
Expand Down Expand Up @@ -149,6 +151,11 @@ var defaultStyle = tcell.StyleDefault.
Background(tcell.ColorBlack)

func main() {
if strings.TrimLeft(os.Args[1], "-") == "version" {
fmt.Println(version)
return
}

// Configure the context to handle SIGINT.
ctx, cancel := context.WithCancel(context.Background())
c := make(chan os.Signal)
Expand Down

0 comments on commit 109eab1

Please sign in to comment.