Skip to content

Commit

Permalink
Refactor structure
Browse files Browse the repository at this point in the history
  • Loading branch information
fbsobreira committed May 3, 2020
1 parent 0062e84 commit f356c55
Show file tree
Hide file tree
Showing 117 changed files with 4,975 additions and 4,546 deletions.
39 changes: 39 additions & 0 deletions cmd/main.go
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()
}
23 changes: 0 additions & 23 deletions common/base58/base58_test.go

This file was deleted.

153 changes: 0 additions & 153 deletions common/crypto/crypto.go

This file was deleted.

46 changes: 0 additions & 46 deletions common/crypto/crypto_test.go

This file was deleted.

14 changes: 0 additions & 14 deletions common/crypto/signature.go

This file was deleted.

5 changes: 0 additions & 5 deletions common/global/global.go

This file was deleted.

76 changes: 0 additions & 76 deletions common/hexutil/hexutils_test.go

This file was deleted.

8 changes: 0 additions & 8 deletions conf/app.conf

This file was deleted.

Loading

0 comments on commit f356c55

Please sign in to comment.