Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 2,890 for labelA (0.29 sec)

  1. src/cmd/compile/internal/types2/labels.go

    // insert records a new label declaration for the current block.
    // The label must not have been declared before in any block.
    func (b *block) insert(s *syntax.LabeledStmt) {
    	name := s.Label.Value
    	if debug {
    		assert(b.gotoTarget(name) == nil)
    	}
    	labels := b.labels
    	if labels == nil {
    		labels = make(map[string]*syntax.LabeledStmt)
    		b.labels = labels
    	}
    	labels[name] = s
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  2. src/internal/types/testdata/check/labels.go

    // This file is a modified concatenation of the files
    // $GOROOT/test/label.go and $GOROOT/test/label1.go.
    
    package labels
    
    var x int
    
    func f0() {
    L1 /* ERROR "label L1 declared and not used" */ :
    	for {
    	}
    L2 /* ERROR "label L2 declared and not used" */ :
    	select {
    	}
    L3 /* ERROR "label L3 declared and not used" */ :
    	switch {
    	}
    L4 /* ERROR "label L4 declared and not used" */ :
    	if true {
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  3. test/label1.go

    		if x == 13 {
    			break L4 // ERROR "invalid break label .*L4"
    		}
    		if x == 14 {
    			continue L4 // ERROR "invalid continue label .*L4|continue is not in a loop$"
    		}
    		if x == 15 {
    			goto L4
    		}
    	}
    
    L5:
    	f2()
    	if x == 16 {
    		break L5 // ERROR "invalid break label .*L5"
    	}
    	if x == 17 {
    		continue L5 // ERROR "invalid continue label .*L5|continue is not in a loop$"
    	}
    	if x == 18 {
    		goto L5
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Nov 28 02:31:54 UTC 2020
    - 2.1K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/labels/labels.go

    limitations under the License.
    */
    
    package labels
    
    import (
    	"fmt"
    	"sort"
    	"strings"
    
    	"k8s.io/apimachinery/pkg/util/validation/field"
    )
    
    // Labels allows you to present labels independently from their storage.
    type Labels interface {
    	// Has returns whether the provided label exists.
    	Has(label string) (exists bool)
    
    	// Get returns the value for the provided label.
    	Get(label string) (value string)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 14 16:39:04 UTC 2022
    - 4.5K bytes
    - Viewed (0)
  5. pkg/util/labels/labels.go

    	for key, value := range labels {
    		newLabels[key] = value
    	}
    	delete(newLabels, labelKey)
    	return newLabels
    }
    
    // AddLabel returns a map with the given key and value added to the given map.
    func AddLabel(labels map[string]string, labelKey, labelValue string) map[string]string {
    	if labelKey == "" {
    		// Don't need to add a label.
    		return labels
    	}
    	if labels == nil {
    		labels = make(map[string]string)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 11 17:34:12 UTC 2017
    - 3.7K bytes
    - Viewed (0)
  6. src/runtime/pprof/label.go

    	for k, v := range parentLabels {
    		childLabels[k] = v
    	}
    	for _, label := range labels.list {
    		childLabels[label.key] = label.value
    	}
    	return context.WithValue(ctx, labelContextKey{}, &childLabels)
    }
    
    // Labels takes an even number of strings representing key-value pairs
    // and makes a [LabelSet] containing them.
    // A label overwrites a prior label with the same key.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 3K bytes
    - Viewed (0)
  7. pilot/pkg/serviceregistry/util/label/label.go

    	LabelTopologyRegion  = "topology.kubernetes.io/region"
    )
    
    // AugmentLabels adds additional labels to the those provided.
    func AugmentLabels(in labels.Instance, clusterID cluster.ID, locality, k8sNode string, networkID network.ID) labels.Instance {
    	// Copy the original labels to a new map.
    	out := make(labels.Instance, len(in)+6)
    	for k, v := range in {
    		out[k] = v
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Oct 11 03:56:40 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  8. pkg/kube/labels/labels.go

    		if value, ok := labels[key]; ok {
    			return value, true
    		}
    	}
    	return "", false
    }
    
    func HasCanonicalServiceName(labels map[string]string) bool {
    	_, ok := lookupLabelValue(labels, nameLabels...)
    	return ok
    }
    
    func HasCanonicalServiceRevision(labels map[string]string) bool {
    	_, ok := lookupLabelValue(labels, revisionLabels...)
    	return ok
    }
    
    func canonicalServiceRevision(labels map[string]string) string {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 20:38:02 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  9. operator/pkg/util/label.go

    // SetLabel is a helper function which sets the specified label and value on the specified object.
    func SetLabel(resource runtime.Object, label, value string) error {
    	resourceAccessor, err := meta.Accessor(resource)
    	if err != nil {
    		return err
    	}
    	labels := resourceAccessor.GetLabels()
    	if labels == nil {
    		labels = map[string]string{}
    	}
    	labels[label] = value
    	resourceAccessor.SetLabels(labels)
    	return nil
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 29 20:42:01 UTC 2020
    - 1.1K bytes
    - Viewed (0)
  10. src/go/types/labels.go

    // insert records a new label declaration for the current block.
    // The label must not have been declared before in any block.
    func (b *block) insert(s *ast.LabeledStmt) {
    	name := s.Label.Name
    	if debug {
    		assert(b.gotoTarget(name) == nil)
    	}
    	labels := b.labels
    	if labels == nil {
    		labels = make(map[string]*ast.LabeledStmt)
    		b.labels = labels
    	}
    	labels[name] = s
    }
    
    // gotoTarget returns the labeled statement in the current
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 7.2K bytes
    - Viewed (0)
Back to top