forked from TrueCloudLab/rclone
vendor: update all dependencies
This commit is contained in:
parent
61ff7306ae
commit
696d012c05
952 changed files with 121647 additions and 34334 deletions
9
vendor/github.com/prometheus/procfs/internal/util/parse.go
generated
vendored
9
vendor/github.com/prometheus/procfs/internal/util/parse.go
generated
vendored
|
@ -73,6 +73,15 @@ func ReadUintFromFile(path string) (uint64, error) {
|
|||
return strconv.ParseUint(strings.TrimSpace(string(data)), 10, 64)
|
||||
}
|
||||
|
||||
// ReadIntFromFile reads a file and attempts to parse a int64 from it.
|
||||
func ReadIntFromFile(path string) (int64, error) {
|
||||
data, err := ioutil.ReadFile(path)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return strconv.ParseInt(strings.TrimSpace(string(data)), 10, 64)
|
||||
}
|
||||
|
||||
// ParseBool parses a string into a boolean pointer.
|
||||
func ParseBool(b string) *bool {
|
||||
var truth bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue