status-protocol-go/applicationmetadata/service.go

18 lines
304 B
Go
Raw Permalink Normal View History

2019-07-26 14:38:27 +00:00
package applicationmetadata
import (
"github.com/golang/protobuf/proto"
)
//go:generate protoc --go_out=. ./message.proto
func Unmarshal(payload []byte) (*Message, error) {
var message Message
err := proto.Unmarshal(payload, &message)
if err != nil {
return nil, err
}
return &message, nil
}