mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-27 15:53:57 +00:00
26 lines
431 B
Go
26 lines
431 B
Go
package main
|
|
|
|
import (
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
func main() {
|
|
subCmd, config := parseCommandLine()
|
|
|
|
var err error
|
|
switch subCmd {
|
|
case createSubCmd:
|
|
err = create(config.(*createConfig))
|
|
case balanceSubCmd:
|
|
err = balance(config.(*balanceConfig))
|
|
case sendSubCmd:
|
|
err = send(config.(*sendConfig))
|
|
default:
|
|
err = errors.Errorf("Unknown sub-command '%s'\n", subCmd)
|
|
}
|
|
|
|
if err != nil {
|
|
printErrorAndExit(err)
|
|
}
|
|
}
|