]> Cypherpunks repositories - gostls13.git/commitdiff
log/slog: rename receiver name for the Value struct from a to v
authorArtem Teleshev <artem.teleshev@gmail.com>
Tue, 15 Aug 2023 18:48:59 +0000 (18:48 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 17 Aug 2023 21:35:14 +0000 (21:35 +0000)
Change-Id: Ib06234e781ed2faf5fa36efeda75c5ae439890ba
GitHub-Last-Rev: 760af943675ee5d44cae97ed6c33b92259d9956f
GitHub-Pull-Request: golang/go#61886
Reviewed-on: https://go-review.googlesource.com/c/go/+/517556
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
src/log/slog/value.go

index 224848f695bc683f1be4286eec6f9069c95c1e24..b6072c5f7b11898064d1f9bad4c9626d638b2340 100644 (file)
@@ -327,22 +327,22 @@ func (v Value) Bool() bool {
        return v.bool()
 }
 
-func (a Value) bool() bool {
-       return a.num == 1
+func (v Value) bool() bool {
+       return v.num == 1
 }
 
 // Duration returns v's value as a time.Duration. It panics
 // if v is not a time.Duration.
-func (a Value) Duration() time.Duration {
-       if g, w := a.Kind(), KindDuration; g != w {
+func (v Value) Duration() time.Duration {
+       if g, w := v.Kind(), KindDuration; g != w {
                panic(fmt.Sprintf("Value kind is %s, not %s", g, w))
        }
 
-       return a.duration()
+       return v.duration()
 }
 
-func (a Value) duration() time.Duration {
-       return time.Duration(int64(a.num))
+func (v Value) duration() time.Duration {
+       return time.Duration(int64(v.num))
 }
 
 // Float64 returns v's value as a float64. It panics
@@ -355,8 +355,8 @@ func (v Value) Float64() float64 {
        return v.float()
 }
 
-func (a Value) float() float64 {
-       return math.Float64frombits(a.num)
+func (v Value) float() float64 {
+       return math.Float64frombits(v.num)
 }
 
 // Time returns v's value as a time.Time. It panics