Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for PathFromString (0.18 sec)

  1. operator/cmd/mesh/test-util_test.go

    	return ret
    }
    
    // HasLabel reports whether 0 has the given label.
    func hasLabel(o *object.K8sObject, label, value string) bool {
    	got, found, err := tpath.Find(o.UnstructuredObject().UnstructuredContent(), util.PathFromString("metadata.labels"))
    	if err != nil {
    		log.Errorf("bad path: %s", err)
    		return false
    	}
    	if !found {
    		return false
    	}
    	return got.(map[string]any)[label] == value
    }
    
    Go
    - Registered: Wed Mar 20 22:53:08 GMT 2024
    - Last Modified: Tue Oct 31 14:48:28 GMT 2023
    - 15.3K bytes
    - Viewed (0)
Back to top