Skip to content

Commit f794fda

Browse files
committed
[uni.go] added supported Unicode standard version to -v/--version report data
1 parent 7217c85 commit f794fda

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

uni.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ import (
88
"io"
99
"os"
1010
"strings"
11+
"unicode"
1112
)
1213

1314
const (
1415
version = "1.0.0"
1516

1617
usage = `Usage: uni (options) [arg 1]...[arg n]
1718
Line Filter Usage: [application command] | uni (options)
18-
1919
`
2020

2121
help = `=================================================
@@ -37,7 +37,6 @@ Line Filter Usage: [application command] | uni (options)
3737
-h, --help Application help
3838
--usage Application usage
3939
-v, --version Application version
40-
4140
`
4241
)
4342

@@ -62,13 +61,14 @@ func main() {
6261
// parse command line flags and handle them
6362
switch {
6463
case *versionShort, *versionLong:
65-
os.Stdout.WriteString("uni v" + version + "\n")
64+
fmt.Printf("uni v%s\n", version)
65+
fmt.Printf("Unicode Standard v%s\n", unicode.Version)
6666
os.Exit(0)
6767
case *helpShort, *helpLong:
68-
os.Stdout.WriteString(help)
68+
fmt.Println(help)
6969
os.Exit(0)
7070
case *usageLong:
71-
os.Stdout.WriteString(usage)
71+
fmt.Println(usage)
7272
os.Exit(0)
7373
}
7474

0 commit comments

Comments
 (0)