Skip to content

Commit

Permalink
fix: remove chinese
Browse files Browse the repository at this point in the history
Signed-off-by: LY-today <[email protected]>
  • Loading branch information
LY-today committed Dec 23, 2024
1 parent fc5493b commit c3328a1
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,13 @@ func (s *Plugin) Score(ctx context.Context, state *framework.CycleState, p *v1.P
}

func intersection(slice1, slice2 []v1.ResourceName) []v1.ResourceName {
// 创建一个 map 来存储 slice2 中的元素
m := make(map[v1.ResourceName]struct{})
result := []v1.ResourceName{}

// 将 slice2 中的所有元素存入 map
for _, v := range slice2 {
m[v] = struct{}{}
}

// 遍历 slice1,找出交集
for _, v := range slice1 {
if _, found := m[v]; found {
result = append(result, v)
Expand All @@ -101,13 +98,11 @@ func intersection(slice1, slice2 []v1.ResourceName) []v1.ResourceName {

func difference(slice1, slice2 []v1.ResourceName) []v1.ResourceName {
var result []v1.ResourceName
// 将 slice2 中的元素存入 map
m := make(map[v1.ResourceName]struct{})
for _, v := range slice2 {
m[v] = struct{}{}
}

// 遍历 slice1,保留在 slice2 中没有的元素
for _, v := range slice1 {
if _, found := m[v]; !found {
result = append(result, v)
Expand All @@ -125,10 +120,6 @@ type preFilterState struct {
framework.Resource
}

func sub() {

}

func computePodResourceRequest(pod *v1.Pod) *preFilterState {
// pod hasn't scheduled yet so we don't need to worry about InPlacePodVerticalScalingEnabled
reqs := resource.PodRequests(pod, resource.PodResourcesOptions{})
Expand Down

0 comments on commit c3328a1

Please sign in to comment.