format code

This commit is contained in:
Deng Ming
2022-12-23 10:25:06 +08:00
parent 15fa7e15d4
commit 5ade9fa025
64 changed files with 35 additions and 109 deletions

View File

@@ -11,7 +11,9 @@ import (
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var (
@@ -339,6 +341,7 @@ func encodeFixed64Log(data []byte, offset int, v uint64) int {
data[offset+7] = uint8(v >> 56)
return offset + 8
}
func encodeFixed32Log(data []byte, offset int, v uint32) int {
data[offset] = uint8(v)
data[offset+1] = uint8(v >> 8)
@@ -346,6 +349,7 @@ func encodeFixed32Log(data []byte, offset int, v uint32) int {
data[offset+3] = uint8(v >> 24)
return offset + 4
}
func encodeVarintLog(data []byte, offset int, v uint64) int {
for v >= 1<<7 {
data[offset] = uint8(v&0x7f | 0x80)
@@ -447,6 +451,7 @@ func sovLog(x uint64) (n int) {
}
return n
}
func sozLog(x uint64) (n int) {
return sovLog((x << 1) ^ (x >> 63))
}

View File

@@ -30,7 +30,6 @@
// log.Debug("debug")
// log.Critical("critical")
//
// more docs http://beego.vip/docs/module/logs.md
package logs
import (