-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0062e84
commit f356c55
Showing
117 changed files
with
4,975 additions
and
4,546 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
"path" | ||
|
||
cmd "github.com/fbsobreira/gotron-sdk/cmd/subcommands" | ||
// Need this side effect | ||
_ "github.com/fbsobreira/gotron-sdk/pkg/store" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var ( | ||
version string | ||
commit string | ||
builtAt string | ||
builtBy string | ||
) | ||
|
||
func main() { | ||
// HACK Force usage of go implementation rather than the C based one. Do the right way, see the | ||
// notes one line 66,67 of https://golang.org/src/net/net.go that say can make the decision at | ||
// build time. | ||
os.Setenv("GODEBUG", "netdns=go") | ||
cmd.VersionWrapDump = version + "-" + commit | ||
cmd.RootCmd.AddCommand(&cobra.Command{ | ||
Use: "version", | ||
Short: "Show version", | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
fmt.Fprintf(os.Stderr, | ||
"TronCTL. %v, version %v-%v (%v %v)\n", | ||
path.Base(os.Args[0]), version, commit, builtBy, builtAt) | ||
os.Exit(0) | ||
return nil | ||
}, | ||
}) | ||
cmd.Execute() | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.