type CPUSet … // New returns a new CPUSet containing the supplied elements. func New(cpus ...int) CPUSet { … } // add adds the supplied elements to the CPUSet. // It is intended for internal use only, since it mutates the CPUSet. func (s CPUSet) add(elems ...int) { … } // Size returns the number of elements in this set. func (s CPUSet) Size() int { … } // IsEmpty returns true if there are zero elements in this set. func (s CPUSet) IsEmpty() bool { … } // Contains returns true if the supplied element is present in this set. func (s CPUSet) Contains(cpu int) bool { … } // Equals returns true if the supplied set contains exactly the same elements // as this set (s IsSubsetOf s2 and s2 IsSubsetOf s). func (s CPUSet) Equals(s2 CPUSet) bool { … } // filter returns a new CPU set that contains all of the elements from this // set that match the supplied predicate, without mutating the source set. func (s CPUSet) filter(predicate func(int) bool) CPUSet { … } // IsSubsetOf returns true if the supplied set contains all the elements func (s CPUSet) IsSubsetOf(s2 CPUSet) bool { … } // Union returns a new CPU set that contains all of the elements from this // set and all of the elements from the supplied sets, without mutating // either source set. func (s CPUSet) Union(s2 ...CPUSet) CPUSet { … } // Intersection returns a new CPU set that contains all of the elements // that are present in both this set and the supplied set, without mutating // either source set. func (s CPUSet) Intersection(s2 CPUSet) CPUSet { … } // Difference returns a new CPU set that contains all of the elements that // are present in this set and not the supplied set, without mutating either // source set. func (s CPUSet) Difference(s2 CPUSet) CPUSet { … } // List returns a slice of integers that contains all elements from // this set. The list is sorted. func (s CPUSet) List() []int { … } // UnsortedList returns a slice of integers that contains all elements from // this set. func (s CPUSet) UnsortedList() []int { … } // String returns a new string representation of the elements in this CPU set // in canonical linux CPU list format. // // See: http://man7.org/linux/man-pages/man7/cpuset.7.html#FORMATS func (s CPUSet) String() string { … } // Parse CPUSet constructs a new CPU set from a Linux CPU list formatted string. // // See: http://man7.org/linux/man-pages/man7/cpuset.7.html#FORMATS func Parse(s string) (CPUSet, error) { … } // Clone returns a copy of this CPU set. func (s CPUSet) Clone() CPUSet { … }