one.go 380 B

1234567891011121314151617181920212223
  1. package main
  2. import (
  3. "fmt"
  4. "gopkg.in/urfave/cli.v1"
  5. "os"
  6. )
  7. var onePeerCommand = cli.Command{
  8. Name: "one",
  9. Usage: "only one peer test.",
  10. Action: one,
  11. ArgsUsage: "<node>",
  12. }
  13. func one(ctx *cli.Context) {
  14. node := getNodeArg(ctx)
  15. fmt.Fprintf(os.Stdout, "Hello one peer kit, node is %v.\n", node.String())
  16. disc := startV4(ctx)
  17. defer disc.Close()
  18. }