Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 39 for stringList (0.34 sec)

  1. src/cmd/go/internal/str/str.go

    	"unicode"
    	"unicode/utf8"
    )
    
    // StringList flattens its arguments into a single []string.
    // Each argument in args must have type string or []string.
    func StringList(args ...any) []string {
    	var x []string
    	for _, arg := range args {
    		switch arg := arg.(type) {
    		case []string:
    			x = append(x, arg...)
    		case string:
    			x = append(x, arg)
    		default:
    			panic("stringList: invalid argument of type " + fmt.Sprintf("%T", arg))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 23 20:08:07 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  2. platforms/core-configuration/model-core/src/main/java/org/gradle/internal/properties/annotations/DefaultTypeMetadataStore.java

            return Collectors.collectingAndThen(Collectors.toList(), stringList -> {
                if (stringList.isEmpty()) {
                    return "";
                }
                if (stringList.size() == 1) {
                    return stringList.get(0);
                }
                int bound = stringList.size() - 1;
                return String.join(", ", stringList.subList(0, bound)) + " or " + stringList.get(bound);
            });
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon May 06 21:54:36 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  3. testing/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/logging/comparison/DiffUtils.java

        }
    
        /** Calculate an incremental Id for a given string. */
        private Integer getIdByLine(String line) {
            int newId = stringList.size();
            Integer existingId = stringToId.put(line, newId);
            if (existingId == null) {
                stringList.add(line);
                return newId;
            } else {
                stringToId.put(line, existingId);
                return existingId;
            }
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  4. pkg/model/proxy_test.go

    			tt.inOut.NodeMetadata.ProxyConfig = nil
    			assert.Equal(t, meta, tt.inOut)
    		})
    	}
    }
    
    func TestStringList(t *testing.T) {
    	cases := []struct {
    		in          string
    		expect      model.StringList
    		noRoundTrip bool
    	}{
    		{in: `"a,b,c"`, expect: []string{"a", "b", "c"}},
    		{in: `"\"a,b,c"`, expect: []string{`"a`, "b", "c"}},
    		{in: `"a"`, expect: []string{"a"}},
    		{in: `""`, expect: []string{}},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 20:38:02 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  5. pkg/model/proxy.go

    	"istio.io/istio/pkg/network"
    	"istio.io/istio/pkg/util/protomarshal"
    )
    
    // StringList is a list that will be marshaled to a comma separate string in Json
    type StringList []string
    
    func (l StringList) MarshalJSON() ([]byte, error) {
    	if l == nil {
    		return nil, nil
    	}
    	return json.Marshal(strings.Join(l, ","))
    }
    
    func (l *StringList) UnmarshalJSON(data []byte) error {
    	var inner string
    	err := json.Unmarshal(data, &inner)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 17:18:17 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  6. src/cmd/go/internal/load/test.go

    		// but we insert at the beginning there too just for consistency.
    		ptest.Imports = str.StringList(p.TestImports, p.Imports)
    		ptest.Internal.Imports = append(imports, p.Internal.Imports...)
    		ptest.Internal.RawImports = str.StringList(rawTestImports, p.Internal.RawImports)
    		ptest.Internal.ForceLibrary = true
    		ptest.Internal.BuildInfo = nil
    		ptest.Internal.Build = new(build.Package)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 14:01:23 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  7. src/cmd/go/internal/work/gc.go

    	if err != nil {
    		return err
    	}
    	if !bytes.Equal(data1, data2) {
    		return fmt.Errorf("%s and %s produced different output files:\n%s\n%s", filepath.Base(args[1].(string)), newTool, strings.Join(str.StringList(args...), " "), strings.Join(str.StringList(newArgs...), " "))
    	}
    	os.Remove(ofile + ".new")
    	return nil
    }
    
    func (gcToolchain) pack(b *Builder, a *Action, afile string, ofiles []string) error {
    	var absOfiles []string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 15:37:44 UTC 2024
    - 23K bytes
    - Viewed (0)
  8. src/cmd/vendor/github.com/google/pprof/internal/plugin/plugin.go

    	Int(name string, def int, usage string) *int
    	Float64(name string, def float64, usage string) *float64
    	String(name string, def string, usage string) *string
    
    	// StringList is similar to String but allows multiple values for a
    	// single flag
    	StringList(name string, def string, usage string) *[]*string
    
    	// ExtraUsage returns any additional text that should be printed after the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  9. src/cmd/go/internal/work/buildid.go

    	// for testing vet or supplying an alternative analysis tool.
    	if name == "vet" && VetTool != "" {
    		path = VetTool
    		desc = VetTool
    	}
    
    	cmdline := str.StringList(cfg.BuildToolexec, path, "-V=full")
    	cmd := exec.Command(cmdline[0], cmdline[1:]...)
    	var stdout, stderr strings.Builder
    	cmd.Stdout = &stdout
    	cmd.Stderr = &stderr
    	if err := cmd.Run(); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:31:25 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/reflect/TypeTokenTest.java

        assertEquals(StringList.class.getGenericInterfaces()[0], token.getType());
      }
    
      @SuppressWarnings("rawtypes") // Trying to test TypeToken.of(List.class)
      public void testGetClass() {
        TypeToken<List> token = TypeToken.of(List.class);
        assertEquals(new TypeToken<List>() {}, token);
      }
    
      public void testGetType() {
        TypeToken<?> t = TypeToken.of(StringList.class.getGenericInterfaces()[0]);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 17:15:24 UTC 2024
    - 88.7K bytes
    - Viewed (0)
Back to top