code: func SliceToPath(unit string) (string, error) {
  	if unit == "-.slice" {
  		return "", nil
  	}
  
  	if !strings.HasSuffix(unit, ".slice") {
  		return "", fmt.Errorf("not a slice")
  	}
  
  	if !sliceNameIsValid(unit) {
  		return "", fmt.Errorf("invalid slice name")
  	}
  
  	prefix := unitnameToPrefix(unit)
  
  	// don't allow initial dashes
  	if prefix[0] == '-' {
  		return "", fmt.Errorf("initial dash")
  	}
  
  	prefixParts := strings.Split(prefix, "-")
  
  	var curSlice string
  	var slicePath string
  	for _, slicePart := range prefixParts {
  		if slicePart == "" {
  			return "", fmt.Errorf("trailing or double dash")
  		}
  
  		if curSlice != "" {
  			curSlice = curSlice + "-"
  		}
  		curSlice = curSlice + slicePart
  
  		curSliceDir := curSlice + ".slice"
  		escaped := cgEscape(curSliceDir)
  
  		slicePath = filepath.Join(slicePath, escaped)
  	}
  
  	return slicePath, nil
  }
docs: // SliceToPath explodes a slice name to its corresponding path in the cgroup
  // hierarchy. For example, a slice named "foo-bar-baz.slice" corresponds to the
  // path "foo.slice/foo-bar.slice/foo-bar-baz.slice". See systemd.slice(5)