From e3cafeaf9292f67459ff1d186f68283bfaedf2ae Mon Sep 17 00:00:00 2001 From: Wim Date: Mon, 31 Jan 2022 00:27:37 +0100 Subject: Add dependencies/vendor (whatsapp) --- vendor/go.mau.fi/libsignal/util/optional/Integer.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 vendor/go.mau.fi/libsignal/util/optional/Integer.go (limited to 'vendor/go.mau.fi/libsignal/util/optional') diff --git a/vendor/go.mau.fi/libsignal/util/optional/Integer.go b/vendor/go.mau.fi/libsignal/util/optional/Integer.go new file mode 100644 index 00000000..9e43af46 --- /dev/null +++ b/vendor/go.mau.fi/libsignal/util/optional/Integer.go @@ -0,0 +1,17 @@ +package optional + +// NewOptionalUint32 returns an optional Uint32 structure. +func NewOptionalUint32(value uint32) *Uint32 { + return &Uint32{Value: value, IsEmpty: false} +} + +func NewEmptyUint32() *Uint32 { + return &Uint32{IsEmpty: true} +} + +// Uint32 is a simple structure for Uint32 values that can +// optionally be nil. +type Uint32 struct { + Value uint32 + IsEmpty bool +} -- cgit v1.2.3