File tree Expand file tree Collapse file tree 2 files changed +0
-7
lines changed Expand file tree Collapse file tree 2 files changed +0
-7
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,6 @@ func Any(key string, value any) Attr {
150
150
func (a Attr ) Key () string { return a .key }
151
151
152
152
// Value returns the Attr's value as an any.
153
- // If the Attr does not have a value, it returns nil.
154
153
func (a Attr ) Value () any {
155
154
switch a .Kind () {
156
155
case AnyKind :
@@ -174,9 +173,6 @@ func (a Attr) Value() any {
174
173
}
175
174
}
176
175
177
- // HasValue reports whether the Attr has a non-nil value.
178
- func (a Attr ) HasValue () bool { return a .any != nil }
179
-
180
176
// Int64 returns the Attr's value as an int64. It panics
181
177
// if the value is not a signed integer.
182
178
func (a Attr ) Int64 () int64 {
Original file line number Diff line number Diff line change @@ -40,9 +40,6 @@ func TestNilAttr(t *testing.T) {
40
40
if g := n .Value (); g != nil {
41
41
t .Errorf ("got %#v, want nil" , g )
42
42
}
43
- if n .HasValue () {
44
- t .Error ("n has value, wanted not" )
45
- }
46
43
}
47
44
48
45
func panics (f func ()) (b bool ) {
You can’t perform that action at this time.
0 commit comments