Files
dasy/vendor/github.com/vacp2p/mvds/protobuf/payload.go
Dean Eigenmann ae2fb13f53 feature/payloads (#7)
* started working on payload concept

* added crypto

* moved into new package, added feed

* added nicer feed stuff

* minor readme for now

* subscribe implemented badly

* doc

* doc block

* cleaned up a little

* making a mutex

* mock, empty test

* test wrapper

* started playing around

* updated mock

* formatted

* updated

* updated interface

* updated

* updated

* updated mock, rewrote test stuff

* todos

* added tests

* reuse

* dont need var
2019-08-07 14:31:32 +02:00

8 lines
205 B
Go

package protobuf
// IsValid checks whether there are any known field in the protobuf
// message
func (m *Payload) IsValid() bool {
return len(m.Messages)+len(m.Acks)+len(m.Offers)+len(m.Requests) != 0
}