From 643f78a8f906161860652632df7261616259debf Mon Sep 17 00:00:00 2001 From: Kevin Atkinson Date: Wed, 5 Sep 2018 03:26:26 -0400 Subject: [PATCH] Change 'IsNil' method to 'Defined'. --- cid.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cid.go b/cid.go index fb6496e..a9ef2cb 100644 --- a/cid.go +++ b/cid.go @@ -161,11 +161,11 @@ type Cid struct{ str string } // also acceptable. var Nil = Cid{} -// Nil returns true if a Cid is uninitialized or the Nil value. -// Calling any other methods on an uninitialized Cid will result in +// Defined returns true if a Cid is defined +// Calling any other methods on an undefined Cid will result in // undefined behavior. -func (c Cid) IsNil() bool { - return c.str == "" +func (c Cid) Defined() bool { + return c.str != "" } // Parse is a short-hand function to perform Decode, Cast etc... on