mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-05 22:27:37 +03:00
Update deps
This commit is contained in:
parent
beb002335f
commit
a47f7fe750
1943 changed files with 7896 additions and 330590 deletions
12
vendor/google.golang.org/protobuf/encoding/protowire/wire.go
generated
vendored
12
vendor/google.golang.org/protobuf/encoding/protowire/wire.go
generated
vendored
|
@ -3,7 +3,7 @@
|
|||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package protowire parses and formats the raw wire encoding.
|
||||
// See https://developers.google.com/protocol-buffers/docs/encoding.
|
||||
// See https://protobuf.dev/programming-guides/encoding.
|
||||
//
|
||||
// For marshaling and unmarshaling entire protobuf messages,
|
||||
// use the "google.golang.org/protobuf/proto" package instead.
|
||||
|
@ -29,12 +29,8 @@ const (
|
|||
)
|
||||
|
||||
// IsValid reports whether the field number is semantically valid.
|
||||
//
|
||||
// Note that while numbers within the reserved range are semantically invalid,
|
||||
// they are syntactically valid in the wire format.
|
||||
// Implementations may treat records with reserved field numbers as unknown.
|
||||
func (n Number) IsValid() bool {
|
||||
return MinValidNumber <= n && n < FirstReservedNumber || LastReservedNumber < n && n <= MaxValidNumber
|
||||
return MinValidNumber <= n && n <= MaxValidNumber
|
||||
}
|
||||
|
||||
// Type represents the wire type.
|
||||
|
@ -516,6 +512,7 @@ func EncodeTag(num Number, typ Type) uint64 {
|
|||
}
|
||||
|
||||
// DecodeZigZag decodes a zig-zag-encoded uint64 as an int64.
|
||||
//
|
||||
// Input: {…, 5, 3, 1, 0, 2, 4, 6, …}
|
||||
// Output: {…, -3, -2, -1, 0, +1, +2, +3, …}
|
||||
func DecodeZigZag(x uint64) int64 {
|
||||
|
@ -523,6 +520,7 @@ func DecodeZigZag(x uint64) int64 {
|
|||
}
|
||||
|
||||
// EncodeZigZag encodes an int64 as a zig-zag-encoded uint64.
|
||||
//
|
||||
// Input: {…, -3, -2, -1, 0, +1, +2, +3, …}
|
||||
// Output: {…, 5, 3, 1, 0, 2, 4, 6, …}
|
||||
func EncodeZigZag(x int64) uint64 {
|
||||
|
@ -530,6 +528,7 @@ func EncodeZigZag(x int64) uint64 {
|
|||
}
|
||||
|
||||
// DecodeBool decodes a uint64 as a bool.
|
||||
//
|
||||
// Input: { 0, 1, 2, …}
|
||||
// Output: {false, true, true, …}
|
||||
func DecodeBool(x uint64) bool {
|
||||
|
@ -537,6 +536,7 @@ func DecodeBool(x uint64) bool {
|
|||
}
|
||||
|
||||
// EncodeBool encodes a bool as a uint64.
|
||||
//
|
||||
// Input: {false, true}
|
||||
// Output: { 0, 1}
|
||||
func EncodeBool(x bool) uint64 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue