16 lines
241 B
Go
16 lines
241 B
Go
|
package controlplane
|
||
|
|
||
|
import (
|
||
|
proto "google.golang.org/protobuf/proto"
|
||
|
"google.golang.org/protobuf/types/known/anypb"
|
||
|
)
|
||
|
|
||
|
func MustAny(msg proto.Message) *anypb.Any {
|
||
|
a, err := anypb.New(msg)
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
|
||
|
return a
|
||
|
}
|