static/jsvm/interfaces/slog.Value.html
A Value can represent any Go value, but unlike type any, it can represent most small values without an allocation. The zero Value corresponds to nil.
anybooldurationequalfloat64groupint64kindlogValuerresolvestringtimeuint64
Any returns v's value as an any.
Bool returns v's value as a bool. It panics if v is not a bool.
Duration returns v's value as a [time.Duration]. It panics if v is not a time.Duration.
Equal reports whether v and w represent the same Go value.
Float64 returns v's value as a float64. It panics if v is not a float64.
Group returns v's value as a []Attr. It panics if v's [Kind] is not [KindGroup].
Int64 returns v's value as an int64. It panics if v is not a signed integer.
Kind returns v's Kind.
LogValuer returns v's value as a LogValuer. It panics if v is not a LogValuer.
Resolve repeatedly calls LogValue on v while it implements [LogValuer], and returns the result. If v resolves to a group, the group's attributes' values are not recursively resolved. If the number of LogValue calls exceeds a threshold, a Value containing an error is returned. Resolve's return value is guaranteed not to be of Kind [KindLogValuer].
String returns Value's value as a string, formatted like [fmt.Sprint]. Unlike the methods Int64, Float64, and so on, which panic if v is of the wrong kind, String never panics.
Time returns v's value as a [time.Time]. It panics if v is not a time.Time.
Uint64 returns v's value as a uint64. It panics if v is not an unsigned integer.
OSLightDark
Generated using TypeDoc