Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for MustAdd (0.09 sec)

  1. pkg/config/schema/codegen/templates/collections.go.tmpl

    	All = collection.NewSchemasBuilder().
    	{{- range .Entries }}
    		MustAdd({{ .Resource.Identifier }}).
    	{{- end }}
    		Build()
    
    	// Kube contains only kubernetes collections.
    	Kube = collection.NewSchemasBuilder().
    	{{- range .Entries }}
    		{{- if or (contains .Resource.Group "k8s.io") .Resource.Builtin  }}
    		MustAdd({{ .Resource.Identifier }}).
    		{{- end }}
    	{{- end }}
    		Build()
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 14:44:17 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  2. pkg/config/schema/collection/schemas.go

    	b.schemas.byCollection[s.GroupVersionKind()] = s
    	b.schemas.byAddOrder = append(b.schemas.byAddOrder, s)
    	return nil
    }
    
    // MustAdd calls Add and panics if it fails.
    func (b *SchemasBuilder) MustAdd(s resource.Schema) *SchemasBuilder {
    	if err := b.Add(s); err != nil {
    		panic(fmt.Sprintf("SchemasBuilder.MustAdd: %v", err))
    	}
    	return b
    }
    
    // Build a new schemas from this SchemasBuilder.
    func (b *SchemasBuilder) Build() Schemas {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 01 08:10:15 UTC 2023
    - 6K bytes
    - Viewed (0)
  3. pkg/config/schema/collection/schemas_test.go

    		g.Expect(r).To(BeNil())
    	}()
    	b := collection.NewSchemasBuilder()
    
    	b.MustAdd(emptyResource)
    }
    
    func TestSchemas_MustRegister_Panic(t *testing.T) {
    	g := NewWithT(t)
    	defer func() {
    		r := recover()
    		g.Expect(r).NotTo(BeNil())
    	}()
    	b := collection.NewSchemasBuilder()
    
    	b.MustAdd(emptyResource)
    	b.MustAdd(emptyResource)
    }
    
    func TestSchema_FindByGroupVersionKind(t *testing.T) {
    	g := NewWithT(t)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  4. pkg/config/analysis/analyzer_test.go

    	g.Expect(a.Metadata().Inputs).To(ConsistOf(col1.GroupVersionKind(), col2.GroupVersionKind(), col3.GroupVersionKind(), col4.GroupVersionKind()))
    
    	removed := a.RemoveSkipped(collection.NewSchemasBuilder().MustAdd(col1).MustAdd(col2).Build())
    
    	g.Expect(removed).To(ConsistOf(a3.Metadata().Name, a4.Metadata().Name))
    	g.Expect(a.Metadata().Inputs).To(ConsistOf(col1.GroupVersionKind(), col2.GroupVersionKind()))
    
    	a.Analyze(&context{})
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  5. pkg/config/schema/collections/mock.go

    				return nil, errors.New("empty key")
    			}
    			return nil, nil
    		},
    	}.MustBuild()
    
    	// Mocks is a Schemas containing the Mock Schema.
    	Mocks = collection.NewSchemasBuilder().MustAdd(Mock).Build()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 01 01:34:15 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  6. platforms/core-configuration/declarative-dsl-core/src/test/kotlin/org/gradle/internal/declarativedsl/dom/DomResolutionTest.kt

            val resolver = tracingCodeResolver()
    
            val topLevelBlock = parseAsTopLevelBlock(
                """
                addAndConfigure("test") {
                    number = 123
                }
                justAdd("test2")
                complexValueOne = one(two("three"))
                complexValueOneFromUtils = utils.oneUtil()
                complexValueTwo = two("three")
                nested {
                    number = 456
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri May 31 13:47:09 UTC 2024
    - 9.3K bytes
    - Viewed (0)
Back to top