Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 149 for Slice (0.12 sec)

  1. istioctl/pkg/writer/envoy/clusters/clusters.go

    			return err
    		}
    	}
    	fmt.Fprintln(c.Stdout, string(out))
    	return nil
    }
    
    func retrieveSortedEndpointClusterSlice(ec []EndpointCluster) []EndpointCluster {
    	sort.Slice(ec, func(i, j int) bool {
    		if ec[i].address == ec[j].address {
    			if ec[i].port == ec[j].port {
    				return ec[i].cluster < ec[j].cluster
    			}
    			return ec[i].port < ec[j].port
    		}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Nov 03 08:41:32 GMT 2022
    - 5.8K bytes
    - Viewed (0)
  2. istioctl/pkg/install/k8sversion/version.go

    func extractKubernetesVersion(versionInfo *version.Info) (int, error) {
    	ver, err := goversion.NewVersion(versionInfo.String())
    	if err != nil {
    		return 0, fmt.Errorf("could not parse %v", err)
    	}
    	// Segments provide slice of int eg: v1.19.1 => [1, 19, 1]
    	num := ver.Segments()[1]
    	return num, nil
    }
    
    // IsK8VersionSupported checks minimum supported Kubernetes version for Istio.
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Mon Jan 22 02:07:51 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  3. cmd/data-usage-utils.go

    	for tier, stats := range ts {
    		infos = append(infos, madmin.TierInfo{
    			Name:  tier,
    			Type:  globalTierConfigMgr.TierType(tier),
    			Stats: stats,
    		})
    	}
    
    	sort.Slice(infos, func(i, j int) bool {
    		if infos[i].Type == "internal" {
    			return true
    		}
    		if infos[j].Type == "internal" {
    			return false
    		}
    		return infos[i].Name < infos[j].Name
    	})
    	return infos
    }
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Mar 10 09:15:15 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  4. istioctl/pkg/injector/injector-list.go

    			if err != nil {
    				return err
    			}
    			fmt.Fprintln(cmd.OutOrStdout())
    			injectedImages, err := getInjectedImages(context.Background(), client)
    			if err != nil {
    				return err
    			}
    
    			sort.Slice(hooks, func(i, j int) bool {
    				return hooks[i].Name < hooks[j].Name
    			})
    			return printHooks(cmd.OutOrStdout(), nslist, hooks, injectedImages)
    		},
    	}
    
    	return cmd
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Jan 04 03:08:06 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  5. cmd/erasure-metadata.go

    			fi.Parts[i] = partInfo
    			return
    		}
    	}
    
    	// Proceed to include new part info.
    	fi.Parts = append(fi.Parts, partInfo)
    
    	// Parts in FileInfo should be in sorted order by part number.
    	sort.Slice(fi.Parts, func(i, j int) bool { return fi.Parts[i].Number < fi.Parts[j].Number })
    }
    
    // ObjectToPartOffset - translate offset of an object to offset of its individual part.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  6. cmd/bucket-replication-utils_test.go

    	expectedReplicationStatus         replication.StatusType
    	expectedOpType                    replication.Type
    	expectedAction                    replicationAction
    }{
    	{ // 1. empty tgtInfos slice
    		name:                              "no replicated targets",
    		tgtInfos:                          []replicatedTargetInfo{},
    		expectedCompletedSize:             0,
    		expectedReplicationStatusInternal: "",
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Aug 08 20:27:40 GMT 2023
    - 9.3K bytes
    - Viewed (0)
  7. cmd/speedtest.go

    				storageClass: opts.storageClass,
    				bucketName:   opts.bucketName,
    				enableSha256: opts.enableSha256,
    			}
    
    			results := globalNotificationSys.SpeedTest(ctx, sopts)
    			sort.Slice(results, func(i, j int) bool {
    				return results[i].Endpoint < results[j].Endpoint
    			})
    
    			totalPut := uint64(0)
    			totalGet := uint64(0)
    			for _, result := range results {
    				totalPut += result.Uploads
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 28 18:04:17 GMT 2024
    - 9K bytes
    - Viewed (0)
  8. callbacks/query.go

    			queryFields := db.QueryFields
    			if !queryFields {
    				switch db.Statement.ReflectValue.Kind() {
    				case reflect.Struct:
    					queryFields = db.Statement.ReflectValue.Type() != db.Statement.Schema.ModelType
    				case reflect.Slice:
    					queryFields = db.Statement.ReflectValue.Type().Elem() != db.Statement.Schema.ModelType
    				}
    			}
    
    			if queryFields {
    				stmt := gorm.Statement{DB: db}
    				// smaller struct
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Jan 29 03:34:57 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  9. internal/config/identity/ldap/config.go

    		}
    		res = append(res, madmin.IDPCfgInfo{
    			Key:   kvsrc.Key,
    			Value: kvsrc.Value,
    			IsCfg: true,
    			IsEnv: kvsrc.Src == config.ValueSourceEnv,
    		})
    	}
    
    	// sort the structs by the key
    	sort.Slice(res, func(i, j int) bool {
    		return res[i].Key < res[j].Key
    	})
    
    	return res, nil
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 21:28:16 GMT 2024
    - 7.9K bytes
    - Viewed (2)
  10. src/bytes/bytes_test.go

    		}
    
    		if string(b) != tt.s {
    			t.Errorf("slice changed to %s; want %s", b, tt.s)
    		}
    		if len(tt.a) > 0 {
    			if want := tt.a[len(tt.a)-1] + "z"; string(x) != want {
    				t.Errorf("last appended result was %s; want %s", x, want)
    			}
    		}
    	}
    }
    
    // Test case for any function which accepts and returns a byte slice.
    // For ease of creation, we write the input byte slice as a string.
    type StringTest struct {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
Back to top