summaryrefslogtreecommitdiff
path: root/rrdformat/rrdbinary/types.go
diff options
context:
space:
mode:
Diffstat (limited to 'rrdformat/rrdbinary/types.go')
-rw-r--r--rrdformat/rrdbinary/types.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/rrdformat/rrdbinary/types.go b/rrdformat/rrdbinary/types.go
index 006af3c..0bf4913 100644
--- a/rrdformat/rrdbinary/types.go
+++ b/rrdformat/rrdbinary/types.go
@@ -31,3 +31,13 @@ type EOF struct{} // 0 bytes
func (u Unival) AsUint64() uint64 { return uint64(u) }
func (u Unival) AsFloat64() float64 { return math.Float64frombits(uint64(u)) }
+
+// Statically assert that each of the above types implements the
+// 'unmarshaler' interface.
+var _ unmarshaler = func() *String { return nil }()
+var _ unmarshaler = func() *Float { return nil }()
+var _ unmarshaler = func() *Uint { return nil }()
+var _ unmarshaler = func() *Int { return nil }()
+var _ unmarshaler = func() *Unival { return nil }()
+var _ unmarshaler = func() *Time { return nil }()
+var _ unmarshaler = func() *EOF { return nil }()