From 8327d12beb75e6471b7f045588acc318d1147146 Mon Sep 17 00:00:00 2001 From: Guillaume Giamarchi Date: Sun, 30 Apr 2017 15:52:12 +0200 Subject: [PATCH] Fix Command snippet in README (#46) Calls for opts and args did not match the actual signature. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e73feff..1769626 100644 --- a/README.md +++ b/README.md @@ -244,10 +244,10 @@ In this function, you can add options and arguments by calling the same methods You would also assign a function to the Action field of the Cmd struct for it to be executed when the command is invoked. ```go docker.Command("run", "Run a command in a new container", func(cmd *cli.Cmd) { - detached := cmd.BoolOpt("d detach", false, "Detached mode: run the container in the background and print the new container ID", nil) - memory := cmd.StringOpt("m memory", "", "Memory limit (format: , where unit = b, k, m or g)", nil) + detached := cmd.BoolOpt("d detach", false, "Detached mode: run the container in the background and print the new container ID") + memory := cmd.StringOpt("m memory", "", "Memory limit (format: , where unit = b, k, m or g)") - image := cmd.StringArg("IMAGE", "", "", nil) + image := cmd.StringArg("IMAGE", "", "") cmd.Action = func() { if *detached {