1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
package cgroups import "path/filepath" func NewNamed(root string, name Name) *namedController { return &namedController{ root: root, name: name, } } type namedController struct { root string name Name } func (n *namedController) Name() Name { return n.name } func (n *namedController) Path(path string) string { return filepath.Join(n.root, string(n.name), path) }