Skip to content

Commit

Permalink
Address code review.
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
  • Loading branch information
kevina committed Jan 17, 2019
1 parent a8c5c91 commit 502da5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/commands/cmdenv/cidbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func GetCidEncoder(req *cmds.Request) (cidenc.Encoder, error) {

// GetLowLevelCidEncoder is like GetCidEncoder but meant to be used by
// lower level commands. It differs from GetCidEncoder in that CIDv0
// and not, by default, auto-upgraded to CIDv1.
// are not, by default, auto-upgraded to CIDv1.
func GetLowLevelCidEncoder(req *cmds.Request) (cidenc.Encoder, error) {
return getCidBase(req, false)
}
Expand Down Expand Up @@ -62,7 +62,7 @@ func CidBaseDefined(req *cmds.Request) bool {
// encoder is used and automatic upgrades are disabled. For CidV1 the
// multibase from the CID is used and upgrades are eneabled. On error
// the base encoder is returned. If you don't care about the error
// condiation it is safe to ignore the error returned.
// condition, it is safe to ignore the error returned.
func CidEncoderFromPath(enc cidenc.Encoder, p string) (cidenc.Encoder, error) {
v, err := extractCidString(p)
if err != nil {
Expand Down
3 changes: 1 addition & 2 deletions core/commands/pin.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,8 @@ Example:
return err
}

refKeys := map[string]RefKeyObject{}
refKeys := make(map[string]RefKeyObject, len(keys))
for k, v := range keys {
delete(keys, k)
refKeys[enc.Encode(k)] = v
}

Expand Down

0 comments on commit 502da5d

Please sign in to comment.