Merge pull request #435 from peco/topic/print-go-version

Print out the go version used to build the app
This commit is contained in:
lestrrat 2017-12-08 09:52:08 +09:00 committed by GitHub
commit 3566702e4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,9 +3,11 @@ package peco
import (
"bufio"
"bytes"
"fmt"
"io"
"os"
"reflect"
"runtime"
"sync"
"time"
"unicode/utf8"
@ -416,7 +418,7 @@ func (p *Peco) parseCommandLine(opts *CLIOptions, args *[]string, argv []string)
}
if opts.OptVersion {
p.Stdout.Write([]byte("peco version " + version + "\n"))
fmt.Fprintf(p.Stdout, "peco version %s (built with %s)\n", version, runtime.Version())
return makeIgnorable(errors.New("user asked to show version"))
}