- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 160 for mustParse (0.14 sec)
-
pkg/apis/core/v1/helper/qos/qos.go
// A pod is burstable if limits and requests do not match across all containers. func ComputePodQOS(pod *v1.Pod) v1.PodQOSClass { requests := v1.ResourceList{} limits := v1.ResourceList{} zeroQuantity := resource.MustParse("0") isGuaranteed := true allContainers := []v1.Container{} allContainers = append(allContainers, pod.Spec.Containers...) allContainers = append(allContainers, pod.Spec.InitContainers...)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 08 04:01:46 UTC 2023 - 3.5K bytes - Viewed (0) -
docs/debugging/hash-set/main.go
flag.Parse() if deploymentID == "" { log.Fatalln("deployment ID is mandatory") } if setCount == 0 { log.Fatalln("set count cannot be zero") } id := uuid.MustParse(deploymentID) if file != "" { distrib := make([][]string, setCount) b, err := os.ReadFile(file) if err != nil { log.Fatalln(err) } b = bytes.ReplaceAll(b, []byte("\r"), []byte{})
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 3.7K bytes - Viewed (0) -
pkg/registry/storage/csistoragecapacity/storage/storage_test.go
} func validNewCSIStorageCapacity(name string) *storageapi.CSIStorageCapacity { selector := metav1.LabelSelector{ MatchLabels: map[string]string{"kubernetes.io/hostname": "node-a"}, } capacity := resource.MustParse("1Gi") return &storageapi.CSIStorageCapacity{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: metav1.NamespaceDefault, }, NodeTopology: &selector, StorageClassName: "some-storage-class",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jul 03 19:54:14 UTC 2020 - 4.4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/named_test.go
package p type Tree[T any] struct { *Node[T] } func (*Tree[R]) N(r R) R { return r } type Node[T any] struct { *Tree[T] } func (Node[Q]) M(Q) {} type Inst = *Tree[int] ` f := mustParse(src) pkg := NewPackage("p", f.PkgName.Value) if err := NewChecker(nil, pkg, nil).Files([]*syntax.File{f}); err != nil { t.Fatal(err) } firstFieldType := func(n *Named) *Named {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 16 21:06:56 UTC 2024 - 3.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/api_test.go
// nopos indicates an unknown position var nopos syntax.Pos func mustParse(src string) *syntax.File { f, err := syntax.Parse(syntax.NewFileBase(pkgName(src)), strings.NewReader(src), nil, nil, 0) if err != nil { panic(err) // so we don't need to pass *testing.T } return f } func typecheck(src string, conf *Config, info *Info) (*Package, error) { f := mustParse(src) if conf == nil { conf = &Config{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 20:08:23 UTC 2024 - 93.3K bytes - Viewed (0) -
cluster/images/etcd/migrate/integration_test.go
"k8s.io/klog/v2" netutils "k8s.io/utils/net" ) var ( testSupportedVersions = mustParseSupportedVersions([]string{"3.0.17", "3.1.12"}) testVersionPrevious = &EtcdVersion{semver.MustParse("3.0.17")} testVersionLatest = &EtcdVersion{semver.MustParse("3.1.12")} ) func init() { // Enable klog which is used in dependencies klog.InitFlags(nil) flag.Set("logtostderr", "true") flag.Set("v", "9") }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Mar 28 07:33:23 UTC 2022 - 11.4K bytes - Viewed (0) -
plugin/pkg/admission/podtolerationrestriction/admission_test.go
) // TestPodAdmission verifies various scenarios involving pod/namespace tolerations func TestPodAdmission(t *testing.T) { CPU1000m := resource.MustParse("1000m") CPU500m := resource.MustParse("500m") burstablePod := &api.Pod{ ObjectMeta: metav1.ObjectMeta{Name: "testPod", Namespace: "testNamespace"}, Spec: api.PodSpec{ Containers: []api.Container{ { Name: "test",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 06 00:00:21 UTC 2024 - 16K bytes - Viewed (0) -
src/go/types/named_test.go
} func (*Tree[R]) N(r R) R { return r } type Node[T any] struct { *Tree[T] } func (Node[Q]) M(Q) {} type Inst = *Tree[int] ` fset := token.NewFileSet() f := mustParse(fset, src) pkg := NewPackage("p", f.Name.Name) if err := NewChecker(nil, fset, pkg, nil).Files([]*ast.File{f}); err != nil { t.Fatal(err) } firstFieldType := func(n *Named) *Named {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 05 16:29:58 UTC 2024 - 3.9K bytes - Viewed (0) -
src/go/types/resolver_test.go
`, } pkgnames := []string{ "fmt", "math", } // parse package files fset := token.NewFileSet() var files []*ast.File for _, src := range sources { files = append(files, mustParse(fset, src)) } // resolve and type-check package AST importer := new(resolveTestImporter) conf := Config{Importer: importer} uses := make(map[*ast.Ident]Object) defs := make(map[*ast.Ident]Object)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 4.5K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/text/language/doc.go
// Danish, and standard Mandarin can be created as follows: // // var matcher = language.NewMatcher([]language.Tag{ // language.English, // The first language is used as fallback. // language.MustParse("en-AU"), // language.Danish, // language.Chinese, // }) // // This list of supported languages is typically implied by the languages for // which there exists translations of the user interface. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 24 13:01:26 UTC 2024 - 4.2K bytes - Viewed (0)