mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver: internal request union
This commit is contained in:
@@ -42,6 +42,13 @@ func MustUnmarshal(um Unmarshaler, data []byte) {
|
||||
}
|
||||
}
|
||||
|
||||
func MaybeUnmarshal(um Unmarshaler, data []byte) bool {
|
||||
if err := um.Unmarshal(data); err != nil {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func GetBool(v *bool) (vv bool, set bool) {
|
||||
if v == nil {
|
||||
return false, false
|
||||
|
||||
Reference in New Issue
Block a user