From 6aa8525f6e1d255c9fcaaf9eb20083155d77ead8 Mon Sep 17 00:00:00 2001 From: Ryan Carver Date: Wed, 24 Oct 2018 10:05:23 -0700 Subject: [PATCH] object patch rm-link: change arg from 'link' to 'name' This improves the semantics of rm-link to be consistent with add-link, clarifying that you should specify the link name as the thing to remove. License: MIT Signed-off-by: Ryan Carver --- core/commands/object/patch.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/commands/object/patch.go b/core/commands/object/patch.go index 6c6388f63..a27574df6 100644 --- a/core/commands/object/patch.go +++ b/core/commands/object/patch.go @@ -145,14 +145,14 @@ Example: var patchRmLinkCmd = &oldcmds.Command{ Helptext: cmdkit.HelpText{ - Tagline: "Remove a link from an object.", + Tagline: "Remove a link from a given object.", ShortDescription: ` -Removes a link by the given name from root. +Remove a Merkle-link from the given object and return the hash of the result. `, }, Arguments: []cmdkit.Argument{ cmdkit.StringArg("root", true, false, "The hash of the node to modify."), - cmdkit.StringArg("link", true, false, "Name of the link to remove."), + cmdkit.StringArg("name", true, false, "Name of the link to remove."), }, Run: func(req oldcmds.Request, res oldcmds.Response) { api, err := req.InvocContext().GetApi() @@ -167,8 +167,8 @@ Removes a link by the given name from root. return } - link := req.Arguments()[1] - p, err := api.Object().RmLink(req.Context(), root, link) + name := req.Arguments()[1] + p, err := api.Object().RmLink(req.Context(), root, name) if err != nil { res.SetError(err, cmdkit.ErrNormal) return