mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-10 06:38:18 +08:00
go1.16 (#14783)
This commit is contained in:
4
vendor/github.com/prometheus/procfs/net_sockstat.go
generated
vendored
4
vendor/github.com/prometheus/procfs/net_sockstat.go
generated
vendored
@ -70,7 +70,7 @@ func readSockstat(name string) (*NetSockstat, error) {
|
||||
|
||||
stat, err := parseSockstat(bytes.NewReader(b))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to read sockstats from %q: %v", name, err)
|
||||
return nil, fmt.Errorf("failed to read sockstats from %q: %w", name, err)
|
||||
}
|
||||
|
||||
return stat, nil
|
||||
@ -90,7 +90,7 @@ func parseSockstat(r io.Reader) (*NetSockstat, error) {
|
||||
// The remaining fields are key/value pairs.
|
||||
kvs, err := parseSockstatKVs(fields[1:])
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error parsing sockstat key/value pairs from %q: %v", s.Text(), err)
|
||||
return nil, fmt.Errorf("error parsing sockstat key/value pairs from %q: %w", s.Text(), err)
|
||||
}
|
||||
|
||||
// The first field is the protocol. We must trim its colon suffix.
|
||||
|
Reference in New Issue
Block a user