Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 170 for marshalers (0.17 sec)

  1. src/log/slog/json_handler_test.go

    				t.Fatal(err)
    			}
    			got := strings.TrimSuffix(buf.String(), "\n")
    			if got != test.want {
    				t.Errorf("\ngot  %s\nwant %s", got, test.want)
    			}
    		})
    	}
    }
    
    // for testing json.Marshaler
    type jsonMarshaler struct {
    	s string
    }
    
    func (j jsonMarshaler) String() string { return j.s } // should be ignored
    
    func (j jsonMarshaler) MarshalJSON() ([]byte, error) {
    	if j.s == "" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 11 17:06:26 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/apis/bootstraptoken/v1/utils.go

    	// result == []string{"abcdef.1234567890123456","abcdef","1234567890123456"}
    	// len(result) == 3
    	validatedSubstringsSize = 3
    )
    
    // MarshalJSON implements the json.Marshaler interface.
    func (bts BootstrapTokenString) MarshalJSON() ([]byte, error) {
    	return []byte(fmt.Sprintf(`"%s"`, bts.String())), nil
    }
    
    // UnmarshalJSON implements the json.Unmarshaller interface.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 26 15:51:39 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  3. operator/pkg/metrics/monitoring.go

    	// OverlayError overlaying YAMLs to combine profile, user
    	// defined settings in CR, Hub-tag etc. fails.
    	OverlayError MergeErrorType = "overlay"
    
    	// IOPFormatError occurs when supplied CR cannot be marshaled
    	// or unmarshaled to/from YAML.
    	IOPFormatError MergeErrorType = "iop_format"
    
    	// TranslateValuesError occurs when translating from legacy API fails.
    	TranslateValuesError MergeErrorType = "translate_values"
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Aug 10 15:35:03 UTC 2023
    - 7K bytes
    - Viewed (0)
  4. pilot/pkg/config/kube/crdclient/client.go

    // Istio store interface, we need to take dynamic inputs. Using the dynamic informers results in poor
    // performance, as the cache will store unstructured objects which need to be marshaled on each Get/List call.
    // Using istio/client-go directly will cache objects marshaled, allowing us to have cheap Get/List calls,
    // at the expense of some code gen.
    package crdclient
    
    import (
    	"fmt"
    	"sync"
    	"time"
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 14 00:12:28 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  5. cmd/batch-handlers_gen.go

    			return
    		}
    	} else {
    		err = z.Expire.EncodeMsg(en)
    		if err != nil {
    			err = msgp.WrapError(err, "Expire")
    			return
    		}
    	}
    	return
    }
    
    // MarshalMsg implements msgp.Marshaler
    func (z *BatchJobRequest) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	// map header, size 6
    	// string "ID"
    	o = append(o, 0x86, 0xa2, 0x49, 0x44)
    	o = msgp.AppendString(o, z.ID)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon May 06 20:27:52 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  6. pkg/credentialprovider/config.go

    	ident.Email = tmp.Email
    
    	if len(tmp.Auth) == 0 {
    		return nil
    	}
    
    	ident.Username, ident.Password, err = decodeDockerConfigFieldAuth(tmp.Auth)
    	return err
    }
    
    // MarshalJSON implements the json.Marshaler interface.
    func (ident DockerConfigEntry) MarshalJSON() ([]byte, error) {
    	toEncode := dockerConfigEntryWithAuth{ident.Username, ident.Password, ident.Email, ""}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 19 15:11:57 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  7. pkg/apis/core/v1/defaults_test.go

    				}
    			} else {
    				if visit.path != "" {
    					marshaled, _ := json.Marshal(defaultedV.Interface())
    					defaults[visit.path] = string(marshaled)
    				}
    				toVisit = append(toVisit, testPath{path: visit.path, value: visit.value.Elem()})
    			}
    
    		case isPrimitive(visit.value.Kind()):
    			if !reflect.DeepEqual(defaultedV.Interface(), zeroV.Interface()) {
    				marshaled, _ := json.Marshal(defaultedV.Interface())
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 84.4K bytes
    - Viewed (0)
  8. src/log/slog/json_handler.go

    	case KindDuration:
    		// Do what json.Marshal does.
    		*s.buf = strconv.AppendInt(*s.buf, int64(v.Duration()), 10)
    	case KindTime:
    		s.appendTime(v.Time())
    	case KindAny:
    		a := v.Any()
    		_, jm := a.(json.Marshaler)
    		if err, ok := a.(error); ok && !jm {
    			s.appendString(err.Error())
    		} else {
    			return appendJSONMarshal(s.buf, a)
    		}
    	default:
    		panic(fmt.Sprintf("bad kind: %s", v.Kind()))
    	}
    	return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 16:18:11 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/runtime/converter.go

    	// TODO: Is this conversion safe?
    	dv.Set(sv)
    	return nil
    }
    
    // ToUnstructured converts an object into map[string]interface{} representation.
    // It uses encoding/json/Marshaler if object implements it or reflection if not.
    func (c *unstructuredConverter) ToUnstructured(obj interface{}) (map[string]interface{}, error) {
    	var u map[string]interface{}
    	var err error
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 16:02:13 UTC 2023
    - 24.9K bytes
    - Viewed (0)
  10. src/internal/chacha8rand/chacha8.go

    	var seed [4]uint64
    	for i := range seed {
    		for {
    			x, ok := s.Next()
    			if ok {
    				seed[i] = x
    				break
    			}
    			s.Refill()
    		}
    	}
    	s.Init64(seed)
    }
    
    // Marshal marshals the state into a byte slice.
    // Marshal and Unmarshal are functions, not methods,
    // so that they will not be linked into the runtime
    // when it uses the State struct, since the runtime
    // does not need these.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:47:29 UTC 2024
    - 4.4K bytes
    - Viewed (0)
Back to top