vendor: github.com/prometheus/client_golang v1.12.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
985711c1f4
commit
ec47096efc
574 changed files with 101741 additions and 22828 deletions
6
vendor/github.com/prometheus/procfs/proc_ns.go
generated
vendored
6
vendor/github.com/prometheus/procfs/proc_ns.go
generated
vendored
|
@ -40,7 +40,7 @@ func (p Proc) Namespaces() (Namespaces, error) {
|
|||
|
||||
names, err := d.Readdirnames(-1)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to read contents of ns dir: %v", err)
|
||||
return nil, fmt.Errorf("failed to read contents of ns dir: %w", err)
|
||||
}
|
||||
|
||||
ns := make(Namespaces, len(names))
|
||||
|
@ -52,13 +52,13 @@ func (p Proc) Namespaces() (Namespaces, error) {
|
|||
|
||||
fields := strings.SplitN(target, ":", 2)
|
||||
if len(fields) != 2 {
|
||||
return nil, fmt.Errorf("failed to parse namespace type and inode from '%v'", target)
|
||||
return nil, fmt.Errorf("failed to parse namespace type and inode from %q", target)
|
||||
}
|
||||
|
||||
typ := fields[0]
|
||||
inode, err := strconv.ParseUint(strings.Trim(fields[1], "[]"), 10, 32)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to parse inode from '%v': %v", fields[1], err)
|
||||
return nil, fmt.Errorf("failed to parse inode from %q: %w", fields[1], err)
|
||||
}
|
||||
|
||||
ns[name] = Namespace{typ, uint32(inode)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue