From 4868964bb99facd8cc6149626023e64db14a6742 Mon Sep 17 00:00:00 2001 From: Elad Date: Fri, 12 Oct 2018 14:51:38 +0200 Subject: cmd/swarm: split flags and cli command declarations to the relevant files (#17896) --- cmd/swarm/upload.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'cmd/swarm/upload.go') diff --git a/cmd/swarm/upload.go b/cmd/swarm/upload.go index 2225127cf..0dbe896e2 100644 --- a/cmd/swarm/upload.go +++ b/cmd/swarm/upload.go @@ -34,8 +34,17 @@ import ( "gopkg.in/urfave/cli.v1" ) -func upload(ctx *cli.Context) { +var upCommand = cli.Command{ + Action: upload, + CustomHelpTemplate: helpTemplate, + Name: "up", + Usage: "uploads a file or directory to swarm using the HTTP API", + ArgsUsage: "", + Flags: []cli.Flag{SwarmEncryptedFlag}, + Description: "uploads a file or directory to swarm using the HTTP API and prints the root hash", +} +func upload(ctx *cli.Context) { args := ctx.Args() var ( bzzapi = strings.TrimRight(ctx.GlobalString(SwarmApiFlag.Name), "/") -- cgit