package util

import "github.com/prometheus/procfs/internal/util"

Index

Functions

func ParseBool

func ParseBool(b string) *bool

ParseBool parses a string into a boolean pointer.

func ParseUint32s

func ParseUint32s(ss []string) ([]uint32, error)

ParseUint32s parses a slice of strings into a slice of uint32s.

func ParseUint64s

func ParseUint64s(ss []string) ([]uint64, error)

ParseUint64s parses a slice of strings into a slice of uint64s.

func ReadUintFromFile

func ReadUintFromFile(path string) (uint64, error)

ReadUintFromFile reads a file and attempts to parse a uint64 from it.

func SysReadFile

func SysReadFile(file string) (string, error)

SysReadFile is here implemented as a noop for builds that do not support the read syscall. For example Windows, or Linux on Google App Engine.

Source Files

parse.go sysreadfile_compat.go

Version
v0.0.1
Published
May 29, 2019
Platform
js/wasm
Imports
4 packages
Last checked
6 minutes ago

Tools for package owners.