- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for splitStrings (0.37 sec)
-
staging/src/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go
type MultiRESTMapper []RESTMapper func (m MultiRESTMapper) String() string { nested := make([]string, 0, len(m)) for _, t := range m { currString := fmt.Sprintf("%v", t) splitStrings := strings.Split(currString, "\n") nested = append(nested, strings.Join(splitStrings, "\n\t")) } return fmt.Sprintf("MultiRESTMapper{\n\t%s\n}", strings.Join(nested, "\n\t")) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 05 23:44:02 UTC 2021 - 5.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest.go
trimmedString = trimmedLongString } else { // not a yaml error, return as-is return []string{errString} } splitStrings := strings.Split(trimmedString, "\n") for i, s := range splitStrings { splitStrings[i] = strings.TrimSpace(s) } return splitStrings } // addStrictDecodingWarnings confirms that the error is a strict decoding error
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 08 21:44:00 UTC 2023 - 17K bytes - Viewed (0) -
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) -
pkg/test/util/yml/parts.go
cfgs := SplitString(content) result := []metav1.ObjectMeta{} for _, cfg := range cfgs { var m metav1.ObjectMeta if e := yaml.Unmarshal([]byte(cfg), &m); e != nil { // Ignore invalid parts. This most commonly happens when it's empty or contains only comments. continue } result = append(result, m) } return result }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Nov 03 08:41:32 UTC 2022 - 2.6K bytes - Viewed (0) -
pkg/test/util/yml/parse.go
type Part struct { Contents string Descriptor Descriptor } // Parse parses the given multi-part yaml text, and returns as Parts. func Parse(yamlText string) ([]Part, error) { splitContent := SplitString(yamlText) parts := make([]Part, 0, len(splitContent)) for _, part := range splitContent { if len(part) > 0 { descriptor, err := ParseDescriptor(part) if err != nil { return nil, err }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Oct 27 09:06:29 UTC 2021 - 2.3K bytes - Viewed (0) -
src/test/java/jcifs/tests/NamingTest.java
} } catch ( UnsupportedCharsetException e ) { Assume.assumeTrue("Charset is not supported on this VM " + oemEncoding, false); } runFilenameTest(splitString(str, 8)); } private static String makeCharsetString ( Charset cs, int min, int max, int... excludes ) { ByteBuffer buf = ByteBuffer.allocate(128); Arrays.sort(excludes);
Registered: Wed Jun 12 15:45:55 UTC 2024 - Last Modified: Sat Jun 06 10:48:05 UTC 2020 - 7K bytes - Viewed (0) -
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) -
pkg/test/framework/components/jwt/kube.go
return err }) } return g.Wait().ErrorOrNil() } func addPullSecret(resource string, pullSecret string) (string, error) { res := yml.SplitString(resource) updatedYaml, err := yml.ApplyPullSecret(res[2], pullSecret) if err != nil { return "", err } mergedYaml := yml.JoinString(res[0], res[1], updatedYaml) return mergedYaml, nil }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Sep 22 23:45:43 UTC 2022 - 4K bytes - Viewed (0) -
pkg/test/framework/components/echo/config/source.go
if err != nil { panic(err) } return out } func (s sourceImpl) Split() ([]Source, error) { raw, err := s.read() if err != nil { return nil, err } pieces := yml.SplitString(raw) if len(pieces) == 1 { // There was nothing to split. Just return the original source. return []Source{s}, nil } out := make([]Source, 0, len(pieces)) for _, p := range pieces {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jul 25 19:30:47 UTC 2022 - 5.2K bytes - Viewed (0) -
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)