Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 444 for Cmp (0.03 sec)

  1. pkg/registry/core/persistentvolume/strategy_test.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package persistentvolume
    
    import (
    	"context"
    
    	"github.com/google/go-cmp/cmp"
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	utilfeature "k8s.io/apiserver/pkg/util/feature"
    	featuregatetesting "k8s.io/component-base/featuregate/testing"
    	apitesting "k8s.io/kubernetes/pkg/api/testing"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 11K bytes
    - Viewed (0)
  2. src/compress/bzip2/huffman.go

    	for i, length := range lengths {
    		pairs[i].value = uint16(i)
    		pairs[i].length = length
    	}
    
    	slices.SortFunc(pairs, func(a, b huffmanSymbolLengthPair) int {
    		if c := cmp.Compare(a.length, b.length); c != 0 {
    			return c
    		}
    		return cmp.Compare(a.value, b.value)
    	})
    
    	// Now we assign codes to the symbols, starting with the longest code.
    	// We keep the codes packed into a uint32, at the most-significant end.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:44:37 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/sets/set.go

    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package sets
    
    import (
    	"cmp"
    	"sort"
    )
    
    // Set is a set of the same type elements, implemented via map[comparable]struct{} for minimal memory consumption.
    type Set[T comparable] map[T]Empty
    
    // cast transforms specified set to generic Set[T].
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 19:51:18 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  4. pkg/registry/apps/statefulset/strategy_test.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package statefulset
    
    import (
    	"testing"
    
    	"github.com/google/go-cmp/cmp"
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/util/intstr"
    	genericapirequest "k8s.io/apiserver/pkg/endpoints/request"
    	utilfeature "k8s.io/apiserver/pkg/util/feature"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 22.1K bytes
    - Viewed (0)
  5. src/cmd/trace/goroutines.go

    		if _, ok := validNonOverlappingStats[sortBy]; ok {
    			slices.SortFunc(goroutines, func(a, b goroutine) int {
    				return cmp.Compare(b.NonOverlappingStats[sortBy], a.NonOverlappingStats[sortBy])
    			})
    		} else {
    			// Sort by total time by default.
    			slices.SortFunc(goroutines, func(a, b goroutine) int {
    				return cmp.Compare(b.TotalTime, a.TotalTime)
    			})
    		}
    
    		// Write down all the non-overlapping stats and sort them.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  6. src/slices/slices.go

    // pair of elements.
    // The result is the first non-zero result of cmp; if cmp always
    // returns 0 the result is 0 if len(s1) == len(s2), -1 if len(s1) < len(s2),
    // and +1 if len(s1) > len(s2).
    func CompareFunc[S1 ~[]E1, S2 ~[]E2, E1, E2 any](s1 S1, s2 S2, cmp func(E1, E2) int) int {
    	for i, v1 := range s1 {
    		if i >= len(s2) {
    			return +1
    		}
    		v2 := s2[i]
    		if c := cmp(v1, v2); c != 0 {
    			return c
    		}
    	}
    	if len(s1) < len(s2) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 29 14:01:59 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  7. pkg/apis/storage/v1beta1/defaults_test.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package v1beta1_test
    
    import (
    	"reflect"
    	"testing"
    
    	"github.com/google/go-cmp/cmp"
    	storagev1beta1 "k8s.io/api/storage/v1beta1"
    	"k8s.io/apimachinery/pkg/runtime"
    	utilfeature "k8s.io/apiserver/pkg/util/feature"
    	featuregatetesting "k8s.io/component-base/featuregate/testing"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  8. src/cmd/go/testdata/script/generate_workspace.txt

    # This is a regression test for Issue #56098: Go generate
    # wasn't initializing workspace mode
    
    [short] skip
    
    go generate ./mod
    cmp ./mod/got.txt want.txt
    
    -- go.work --
    go 1.22
    
    use ./mod
    -- mod/go.mod --
    module example.com/mod
    -- mod/gen.go --
    //go:generate go run gen.go got.txt
    
    package main
    
    import "os"
    
    func main() {
        outfile := os.Args[1]
        os.WriteFile(outfile, []byte("Hello World!\n"), 0644)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 29 19:39:24 UTC 2024
    - 437 bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/storage/testing/utils.go

    limitations under the License.
    */
    
    package testing
    
    import (
    	"bytes"
    	"context"
    	"fmt"
    	"path"
    	"reflect"
    	"sync"
    	"sync/atomic"
    	"testing"
    	"time"
    
    	"github.com/google/go-cmp/cmp"
    	"k8s.io/apimachinery/pkg/api/meta"
    	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/runtime"
    	"k8s.io/apimachinery/pkg/util/wait"
    	"k8s.io/apimachinery/pkg/watch"
    	"k8s.io/apiserver/pkg/apis/example"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 22 07:26:55 UTC 2024
    - 10.3K bytes
    - Viewed (1)
  10. cmd/kube-controller-manager/app/controllermanager_test.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package app
    
    import (
    	"context"
    	"regexp"
    	"strings"
    	"testing"
    
    	"github.com/google/go-cmp/cmp"
    
    	"k8s.io/apimachinery/pkg/util/sets"
    	utilfeature "k8s.io/apiserver/pkg/util/feature"
    	cpnames "k8s.io/cloud-provider/names"
    	"k8s.io/component-base/featuregate"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 8.2K bytes
    - Viewed (0)
Back to top