-
Notifications
You must be signed in to change notification settings - Fork 136
Expand file tree
/
Copy pathcmd_version.go
More file actions
32 lines (26 loc) · 811 Bytes
/
Copy pathcmd_version.go
File metadata and controls
32 lines (26 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2026 The go-python Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"fmt"
"github.com/gonuts/commander"
"github.com/gonuts/flag"
)
func gopyMakeCmdVersion() *commander.Command {
return &commander.Command{
Run: gopyRunCmdVersion,
UsageLine: "version",
Short: "print gopy version information",
Long: `
version prints the gopy version, git commit, and build date embedded in this binary at release time.
ex:
$ gopy version
`,
Flag: *flag.NewFlagSet("gopy-version", flag.ExitOnError),
}
}
func gopyRunCmdVersion(cmdr *commander.Command, args []string) error {
fmt.Printf("gopy version %s (commit %s, built %s)\n", Version, GitCommit, VersionDate)
return nil
}