Commit Graph

3 Commits

Author SHA1 Message Date
Ukri Niemimuukko
39c934b22f topology: avoid unnecessary warning prints
Doing strings.Split with a non-empty separator against a potentially
empty string (hint.NUMAs) may return an empty string in a slice of
size one, which then doesn't parse nicely with ParseInt and results
in a repeating warning.

It is better to check for hint.NUMAs emptiness before trying to
split it.

Signed-off-by: Ukri Niemimuukko <ukri.niemimuukko@intel.com>
2020-04-16 19:11:39 +03:00
Ed Bartosh
366d07a35e topology: Fix lint warnings
Fixed the following golint warnings:
 $ make checks
  ./pkg/topology/topology.go:44:6: type name will be used as topology.TopologyHint by other packages, and that stutters; consider calling this Hint
  ./pkg/topology/topology.go:52:6: type name will be used as topology.TopologyHints by other packages, and that stutters; consider calling this Hints
  Found 2 lint suggestions; failing.
  Makefile:47: recipe for target 'lint' failed
2020-02-11 14:20:44 +02:00
Ed Bartosh
3f83e2b2eb Copy toplogogy module from cri-resource-manager
Copied topology module to avoid external dependency.
Added GetTopologyInfo function and its test case.
2020-02-11 12:06:25 +02:00