Skip to content

Commit 2ab365f

Browse files
zoerecoholiman
andauthored
all: fix docstring names (#28923)
* fix wrong comment * reviewers input * Update log/handler_glog.go --------- Co-authored-by: Martin HS <[email protected]>
1 parent 69f5d5b commit 2ab365f

File tree

12 files changed

+13
-13
lines changed

12 files changed

+13
-13
lines changed

core/chain_makers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func (b *BlockGen) SetDifficulty(diff *big.Int) {
8383
b.header.Difficulty = diff
8484
}
8585

86-
// SetPos makes the header a PoS-header (0 difficulty)
86+
// SetPoS makes the header a PoS-header (0 difficulty)
8787
func (b *BlockGen) SetPoS() {
8888
b.header.Difficulty = new(big.Int)
8989
}

crypto/bn256/google/bn256.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ type G2 struct {
166166
p *twistPoint
167167
}
168168

169-
// RandomG1 returns x and g₂ˣ where x is a random, non-zero number read from r.
169+
// RandomG2 returns x and g₂ˣ where x is a random, non-zero number read from r.
170170
func RandomG2(r io.Reader) (*big.Int, *G2, error) {
171171
var k *big.Int
172172
var err error

internal/ethapi/api.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ func (s *BlockChainAPI) GetBalance(ctx context.Context, address common.Address,
655655
return (*hexutil.Big)(b), state.Error()
656656
}
657657

658-
// Result structs for GetProof
658+
// AccountResult structs for GetProof
659659
type AccountResult struct {
660660
Address common.Address `json:"address"`
661661
AccountProof []string `json:"accountProof"`

log/handler_glog.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ func (h *GlogHandler) Handle(_ context.Context, r slog.Record) error {
192192
frame, _ := fs.Next()
193193

194194
for _, rule := range h.patterns {
195-
if rule.pattern.MatchString(fmt.Sprintf("%+s", frame.File)) {
195+
if rule.pattern.MatchString(fmt.Sprintf("+%s", frame.File)) {
196196
h.siteCache[r.PC], lvl, ok = rule.level, rule.level, true
197197
}
198198
}

metrics/counter.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type CounterSnapshot interface {
88
Count() int64
99
}
1010

11-
// Counters hold an int64 value that can be incremented and decremented.
11+
// Counter hold an int64 value that can be incremented and decremented.
1212
type Counter interface {
1313
Clear()
1414
Dec(int64)

metrics/gauge.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ package metrics
22

33
import "sync/atomic"
44

5-
// gaugeSnapshot contains a readonly int64.
5+
// GaugeSnapshot contains a readonly int64.
66
type GaugeSnapshot interface {
77
Value() int64
88
}
99

10-
// Gauges hold an int64 value that can be set arbitrarily.
10+
// Gauge holds an int64 value that can be set arbitrarily.
1111
type Gauge interface {
1212
Snapshot() GaugeSnapshot
1313
Update(int64)

metrics/gauge_float64.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type gaugeFloat64Snapshot float64
4848
// Value returns the value at the time the snapshot was taken.
4949
func (g gaugeFloat64Snapshot) Value() float64 { return float64(g) }
5050

51-
// NilGauge is a no-op Gauge.
51+
// NilGaugeFloat64 is a no-op Gauge.
5252
type NilGaugeFloat64 struct{}
5353

5454
func (NilGaugeFloat64) Snapshot() GaugeFloat64Snapshot { return NilGaugeFloat64{} }

metrics/gauge_info.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type GaugeInfoSnapshot interface {
99
Value() GaugeInfoValue
1010
}
1111

12-
// GaugeInfos hold a GaugeInfoValue value that can be set arbitrarily.
12+
// GaugeInfo holds a GaugeInfoValue value that can be set arbitrarily.
1313
type GaugeInfo interface {
1414
Update(GaugeInfoValue)
1515
Snapshot() GaugeInfoSnapshot

metrics/healthcheck.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package metrics
22

3-
// Healthchecks hold an error value describing an arbitrary up/down status.
3+
// Healthcheck holds an error value describing an arbitrary up/down status.
44
type Healthcheck interface {
55
Check()
66
Error() error

metrics/histogram.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ type HistogramSnapshot interface {
44
SampleSnapshot
55
}
66

7-
// Histograms calculate distribution statistics from a series of int64 values.
7+
// Histogram calculates distribution statistics from a series of int64 values.
88
type Histogram interface {
99
Clear()
1010
Update(int64)

metrics/influxdb/influxdbv2.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type v2Reporter struct {
2525
write api.WriteAPI
2626
}
2727

28-
// InfluxDBWithTags starts a InfluxDB reporter which will post the from the given metrics.Registry at each d interval with the specified tags
28+
// InfluxDBV2WithTags starts a InfluxDB reporter which will post the from the given metrics.Registry at each d interval with the specified tags
2929
func InfluxDBV2WithTags(r metrics.Registry, d time.Duration, endpoint string, token string, bucket string, organization string, namespace string, tags map[string]string) {
3030
rep := &v2Reporter{
3131
reg: r,

p2p/discover/metrics.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func newMeteredConn(conn UDPConn) UDPConn {
5858
return &meteredUdpConn{UDPConn: conn}
5959
}
6060

61-
// Read delegates a network read to the underlying connection, bumping the udp ingress traffic meter along the way.
61+
// ReadFromUDP delegates a network read to the underlying connection, bumping the udp ingress traffic meter along the way.
6262
func (c *meteredUdpConn) ReadFromUDP(b []byte) (n int, addr *net.UDPAddr, err error) {
6363
n, addr, err = c.UDPConn.ReadFromUDP(b)
6464
ingressTrafficMeter.Mark(int64(n))

0 commit comments

Comments
 (0)