Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for HasLabel (0.26 sec)

  1. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go

    func SetMetaDataAnnotation(obj *ObjectMeta, ann string, value string) {
    	if obj.Annotations == nil {
    		obj.Annotations = make(map[string]string)
    	}
    	obj.Annotations[ann] = value
    }
    
    // HasLabel returns a bool if passed in label exists
    func HasLabel(obj ObjectMeta, label string) bool {
    	_, found := obj.Labels[label]
    	return found
    }
    
    // SetMetaDataLabel sets the label and value
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Sep 15 10:58:36 UTC 2022
    - 9.6K bytes
    - Viewed (0)
  2. operator/cmd/mesh/test-util_test.go

    			if len(lkv) != 2 {
    				panic("label must have format key=value")
    			}
    			if !hasLabel(obj, lkv[0], lkv[1]) {
    				hasAll = false
    				break
    			}
    		}
    		if hasAll {
    			ret.append(obj)
    		}
    	}
    	return ret
    }
    
    // HasLabel reports whether 0 has the given label.
    func hasLabel(o *object.K8sObject, label, value string) bool {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 15.3K bytes
    - Viewed (0)
  3. src/cmd/vendor/github.com/google/pprof/profile/profile.go

    // samples in the profile.
    func (p *Profile) RemoveLabel(key string) {
    	for _, sample := range p.Sample {
    		delete(sample.Label, key)
    	}
    }
    
    // HasLabel returns true if a sample has a label with indicated key and value.
    func (s *Sample) HasLabel(key, value string) bool {
    	for _, v := range s.Label[key] {
    		if v == value {
    			return true
    		}
    	}
    	return false
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 22.3K bytes
    - Viewed (0)
  4. src/go/types/stmt.go

    	}(check.environment, check.indent)
    	check.environment = environment{
    		decl:  decl,
    		scope: sig.scope,
    		iota:  iota,
    		sig:   sig,
    	}
    	check.indent = 0
    
    	check.stmtList(0, body.List)
    
    	if check.hasLabel {
    		check.labels(body)
    	}
    
    	if sig.results.Len() > 0 && !check.isTerminating(body, "") {
    		check.error(atPos(body.Rbrace), MissingReturn, "missing return")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/admission_test.go

    				continue
    			}
    		}
    
    		if paramRef.Selector != nil {
    			ls := p.GetLabels()
    			matched := true
    
    			for k, v := range paramRef.Selector.MatchLabels {
    				if l, hasLabel := ls[k]; !hasLabel {
    					matched = false
    					break
    				} else if l != v {
    					matched = false
    					break
    				}
    			}
    
    			// Empty selector matches everything
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 25 01:39:01 UTC 2024
    - 63.8K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/stmt.go

    	}(check.environment, check.indent)
    	check.environment = environment{
    		decl:  decl,
    		scope: sig.scope,
    		iota:  iota,
    		sig:   sig,
    	}
    	check.indent = 0
    
    	check.stmtList(0, body.List)
    
    	if check.hasLabel && !check.conf.IgnoreBranchErrors {
    		check.labels(body)
    	}
    
    	if sig.results.Len() > 0 && !check.isTerminating(body, "") {
    		check.error(body.Rbrace, MissingReturn, "missing return")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  7. src/go/types/check.go

    	sig           *Signature             // function signature if inside a function; nil otherwise
    	isPanic       map[*ast.CallExpr]bool // set of panic call expressions (used for termination check)
    	hasLabel      bool                   // set if a function makes use of labels (only ~1% of functions); unused outside functions
    	hasCallOrRecv bool                   // set if an expression contains a function call or channel receive operation
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/check.go

    	sig           *Signature                // function signature if inside a function; nil otherwise
    	isPanic       map[*syntax.CallExpr]bool // set of panic call expressions (used for termination check)
    	hasLabel      bool                      // set if a function makes use of labels (only ~1% of functions); unused outside functions
    	hasCallOrRecv bool                      // set if an expression contains a function call or channel receive operation
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 23.3K bytes
    - Viewed (0)
Back to top