Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for FieldsSeq (0.04 sec)

  1. src/bytes/iter.go

    	return splitSeq(s, sep, len(sep))
    }
    
    // FieldsSeq returns an iterator over subslices of s split around runs of
    // whitespace characters, as defined by [unicode.IsSpace].
    // The iterator yields the same subslices that would be returned by [Fields](s),
    // but without constructing a new slice containing the subslices.
    func FieldsSeq(s []byte) iter.Seq[[]byte] {
    	return func(yield func([]byte) bool) {
    		start := -1
    Registered: Tue Dec 30 11:13:12 UTC 2025
    - Last Modified: Wed Sep 03 14:04:47 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  2. src/bytes/bytes_test.go

    		if !slices.Equal(result, tt.a) {
    			t.Errorf("Fields(%q) = %v; want %v", tt.s, a, tt.a)
    			continue
    		}
    
    		result2 := sliceOfString(collect(t, FieldsSeq([]byte(tt.s))))
    		if !slices.Equal(result2, tt.a) {
    			t.Errorf(`collect(FieldsSeq(%q)) = %v; want %v`, tt.s, result2, tt.a)
    		}
    
    		if string(b) != tt.s {
    			t.Errorf("slice changed to %s; want %s", string(b), tt.s)
    		}
    		if len(tt.a) > 0 {
    Registered: Tue Dec 30 11:13:12 UTC 2025
    - Last Modified: Tue Dec 23 23:54:14 UTC 2025
    - 62.9K bytes
    - Viewed (0)
  3. internal/config/config.go

    		return Error[ErrConfigNotFound]("sub-system %s:%s already deleted or does not exist", subSys, tgt)
    	}
    
    	if len(inputs) == 2 {
    		currKVS := ck.Clone()
    		defKVS := DefaultKVS[subSys]
    		for delKey := range strings.FieldsSeq(inputs[1]) {
    			_, ok := currKVS.Lookup(delKey)
    			if !ok {
    				return Error[ErrConfigNotFound]("key %s doesn't exist", delKey)
    			}
    			defVal, isDef := defKVS.Lookup(delKey)
    			if isDef {
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Sun Sep 28 20:59:21 UTC 2025
    - 37.7K bytes
    - Viewed (0)
Back to top