mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 06:34:40 +03:00
update latest prometheus client dependency and its dependencies
This commit is contained in:
8
vendor/github.com/prometheus/procfs/proc_maps.go
generated
vendored
8
vendor/github.com/prometheus/procfs/proc_maps.go
generated
vendored
@ -65,7 +65,7 @@ type ProcMap struct {
|
||||
func parseDevice(s string) (uint64, error) {
|
||||
toks := strings.Split(s, ":")
|
||||
if len(toks) < 2 {
|
||||
return 0, fmt.Errorf("unexpected number of fields")
|
||||
return 0, fmt.Errorf("%w: unexpected number of fields, expected: 2, got: %q", ErrFileParse, len(toks))
|
||||
}
|
||||
|
||||
major, err := strconv.ParseUint(toks[0], 16, 0)
|
||||
@ -95,7 +95,7 @@ func parseAddress(s string) (uintptr, error) {
|
||||
func parseAddresses(s string) (uintptr, uintptr, error) {
|
||||
toks := strings.Split(s, "-")
|
||||
if len(toks) < 2 {
|
||||
return 0, 0, fmt.Errorf("invalid address")
|
||||
return 0, 0, fmt.Errorf("%w: invalid address", ErrFileParse)
|
||||
}
|
||||
|
||||
saddr, err := parseAddress(toks[0])
|
||||
@ -114,7 +114,7 @@ func parseAddresses(s string) (uintptr, uintptr, error) {
|
||||
// parsePermissions parses a token and returns any that are set.
|
||||
func parsePermissions(s string) (*ProcMapPermissions, error) {
|
||||
if len(s) < 4 {
|
||||
return nil, fmt.Errorf("invalid permissions token")
|
||||
return nil, fmt.Errorf("%w: invalid permissions token", ErrFileParse)
|
||||
}
|
||||
|
||||
perms := ProcMapPermissions{}
|
||||
@ -141,7 +141,7 @@ func parsePermissions(s string) (*ProcMapPermissions, error) {
|
||||
func parseProcMap(text string) (*ProcMap, error) {
|
||||
fields := strings.Fields(text)
|
||||
if len(fields) < 5 {
|
||||
return nil, fmt.Errorf("truncated procmap entry")
|
||||
return nil, fmt.Errorf("%w: truncated procmap entry", ErrFileParse)
|
||||
}
|
||||
|
||||
saddr, eaddr, err := parseAddresses(fields[0])
|
||||
|
Reference in New Issue
Block a user