Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for splitStrings (0.22 sec)

  1. pkg/test/util/yml/parts_test.go

    		t.Run(c.name, func(t *testing.T) {
    			parts := yml.SplitString(c.doc)
    			g := NewWithT(t)
    			g.Expect(parts).To(Equal(expected))
    		})
    	}
    }
    
    func TestSplitWithNestedDocument(t *testing.T) {
    	doc := `
    b
        b1
        ---
        b2
    `
    	expected := []string{
    		`b
        b1
        ---
        b2`,
    	}
    
    	g := NewWithT(t)
    	parts := yml.SplitString(doc)
    	g.Expect(parts).To(Equal(expected))
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  2. pkg/test/util/yml/apply.go

    	"istio.io/istio/pkg/test/util/tmpl"
    )
    
    // ApplyNamespace applies the given namespaces to the resources in the yamlText if not set.
    func ApplyNamespace(yamlText, ns string) (string, error) {
    	chunks := SplitString(yamlText)
    
    	toJoin := make([]string, 0, len(chunks))
    	for _, chunk := range chunks {
    		chunk, err := applyNamespace(chunk, ns)
    		if err != nil {
    			return "", err
    		}
    		toJoin = append(toJoin, chunk)
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 17 07:02:38 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  3. pkg/test/framework/components/istio/cleanup.go

    			err = multierror.Append(err, e)
    		}
    		return
    	})
    }
    
    // When we cleanup, we should not delete CRDs. This will filter out all the crds
    func removeCRDs(istioYaml string) string {
    	allParts := yml.SplitString(istioYaml)
    	nonCrds := make([]string, 0, len(allParts))
    
    	// Make the regular expression multi-line and anchor to the beginning of the line.
    	r := regexp.MustCompile(`(?m)^kind: CustomResourceDefinition$`)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 22:12:34 UTC 2024
    - 5K bytes
    - Viewed (0)
  4. pkg/test/framework/components/authz/kube.go

    	newPolicy := s.PullPolicy
    	yamlText = strings.ReplaceAll(yamlText, oldPolicy, newPolicy)
    
    	return yamlText, nil
    }
    
    func addPullSecret(resource string, pullSecret string) (string, error) {
    	res := yml.SplitString(resource)
    	updatedYaml, err := yml.ApplyPullSecret(res[1], pullSecret)
    	if err != nil {
    		return "", err
    	}
    	mergedYaml := yml.JoinString(res[0], updatedYaml)
    	return mergedYaml, nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 10 20:33:28 UTC 2024
    - 7K bytes
    - Viewed (0)
  5. tests/integration/pilot/validation_test.go

    			} {
    				recognized.Delete(gvk)
    			}
    
    			tested := sets.New[string]()
    			for _, te := range loadTestData(t) {
    				yamlBatch, err := te.load()
    				yamlParts := yml.SplitString(yamlBatch)
    				for _, yamlPart := range yamlParts {
    					if err != nil {
    						t.Fatalf("error loading test data: %v", err)
    					}
    
    					m := make(map[string]any)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Dec 13 15:19:36 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  6. pkg/test/framework/config.go

    	c.yamlText[ns] = append(c.yamlText[ns], splitYAML(yamlText...)...)
    	return c
    }
    
    func splitYAML(yamlText ...string) []string {
    	var out []string
    	for _, doc := range yamlText {
    		out = append(out, yml.SplitString(doc)...)
    	}
    	return out
    }
    
    func (c *configPlan) File(ns string, paths ...string) config.Plan {
    	yamlText, err := file.AsStringArray(paths...)
    	if err != nil {
    		panic(err)
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 22:12:34 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  7. pkg/config/crd/validator.go

    			return true
    		}
    	}
    	return false
    }
    
    func (v *Validator) ValidateCustomResourceYAML(data string, ignorer *ValidationIgnorer) error {
    	var errs *multierror.Error
    	for _, item := range yml.SplitString(data) {
    		obj := &unstructured.Unstructured{}
    		if err := yaml.Unmarshal([]byte(item), obj); err != nil {
    			return err
    		}
    		if ignorer != nil && ignorer.ShouldIgnore(obj.GetNamespace(), obj.GetName()) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 17 15:38:40 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  8. pkg/kube/client.go

    		})
    	}
    	return g.Wait()
    }
    
    func (c *client) ApplyYAMLContents(namespace string, yamls ...string) error {
    	g, _ := errgroup.WithContext(context.TODO())
    	for _, yaml := range yamls {
    		cfgs := yml.SplitString(yaml)
    		for _, cfg := range cfgs {
    			cfg := cfg
    			g.Go(func() error {
    				return c.ssapplyYAML(cfg, namespace, false)
    			})
    		}
    	}
    	return g.Wait()
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 14:44:17 UTC 2024
    - 39K bytes
    - Viewed (0)
  9. pilot/pkg/config/kube/gateway/deploymentcontroller.go

    		ProxyConfig: proxyConfig,
    		MeshConfig:  cfg.MeshConfig,
    		Values:      cfg.Values.Map(),
    	}
    	results, err := tmpl.Execute(template, input)
    	if err != nil {
    		return nil, err
    	}
    
    	return yml.SplitString(results), nil
    }
    
    func (d *DeploymentController) setGatewayControllerVersion(gws gateway.Gateway) error {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon May 13 21:43:20 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/func.go

    	a, ok := f.CanonicalLocalSlots[slot]
    	if !ok {
    		a = new(LocalSlot)
    		*a = slot // don't escape slot
    		f.CanonicalLocalSlots[slot] = a
    	}
    	return a
    }
    
    func (f *Func) SplitString(name *LocalSlot) (*LocalSlot, *LocalSlot) {
    	ptrType := types.NewPtr(types.Types[types.TUINT8])
    	lenType := types.Types[types.TINT]
    	// Split this string up into two separate variables.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 25.8K bytes
    - Viewed (0)
Back to top