Delete unused code
This commit is contained in:
parent
a7da926abb
commit
1bd94074dd
5 changed files with 13 additions and 139 deletions
|
|
@ -14,24 +14,11 @@
|
|||
package collector
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func splitToInts(str, sep string) ([]int, error) {
|
||||
var ints []int
|
||||
for _, part := range strings.Split(str, sep) {
|
||||
i, err := strconv.Atoi(part)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not split '%s' because %s is no int: %s", str, part, err)
|
||||
}
|
||||
ints = append(ints, i)
|
||||
}
|
||||
return ints, nil
|
||||
}
|
||||
|
||||
func readUintFromFile(path string) (uint64, error) {
|
||||
data, err := ioutil.ReadFile(path)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue