Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 37 for marshaled (0.15 sec)

  1. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/time_test.go

    	}
    
    	for _, c := range cases {
    		input := TimeHolder{c.input}
    		result, err := yaml.Marshal(&input)
    		if err != nil {
    			t.Errorf("Failed to marshal input: '%v': %v", input, err)
    		}
    		if string(result) != c.result {
    			t.Errorf("Failed to marshal input: '%v': expected %+v, got %q", input, c.result, string(result))
    		}
    	}
    }
    
    func TestTimeUnmarshalYAML(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  2. pkg/proxy/util/linebuffer.go

    	// returns the number of times Write() or WriteBytes() was called; it assumes that
    	// you never wrote any newlines to the buffer yourself.
    	Lines() int
    }
    
    var _ logr.Marshaler = &realLineBuffer{}
    
    type realLineBuffer struct {
    	b     bytes.Buffer
    	lines int
    }
    
    // NewLineBuffer returns a new "real" LineBuffer
    func NewLineBuffer() LineBuffer {
    	return &realLineBuffer{}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 05:08:41 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  3. istioctl/pkg/writer/envoy/configdump/endpoint.go

    	}
    	dump, err := c.retrieveSortedEndpointsSlice(filter)
    	if err != nil {
    		return err
    	}
    	marshaller := make(proto.MessageSlice, 0, len(dump))
    	for _, eds := range dump {
    		marshaller = append(marshaller, eds)
    	}
    	out, err := json.MarshalIndent(marshaller, "", "    ")
    	if err != nil {
    		return err
    	}
    	if outputFormat == "yaml" {
    		if out, err = yaml.JSONToYAML(out); err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 21 17:42:54 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  4. pkg/kube/apimirror/probe.go

    	}
    	intstr.Type = Int
    	return json.Unmarshal(value, &intstr.IntVal)
    }
    
    // MarshalJSON implements the json.Marshaller interface.
    func (intstr IntOrString) MarshalJSON() ([]byte, error) {
    	switch intstr.Type {
    	case Int:
    		return json.Marshal(intstr.IntVal)
    	case String:
    		return json.Marshal(intstr.StrVal)
    	default:
    		return []byte{}, fmt.Errorf("impossible IntOrString.Type")
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  5. src/internal/chacha8rand/chacha8.go

    				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.
    func Marshal(s *State) []byte {
    	data := make([]byte, 6*8)
    	copy(data, "chacha8:")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:47:29 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  6. src/internal/coverage/cfile/ts_test.go

    	mfc := coverage.MetaFileCollection{
    		ImportPaths:       []string{"command-line-arguments"},
    		MetaFileFragments: []string{mfile},
    	}
    	jdata, err := json.Marshal(mfc)
    	if err != nil {
    		t.Fatalf("marshal MetaFileCollection: %v", err)
    	}
    	if err := os.WriteFile(metafiles, jdata, 0666); err != nil {
    		t.Fatalf("write failed: %v", err)
    	}
    
    	// Kick off guts of test.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:58:07 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  7. cmd/bucket-encryption-handlers.go

    				writeErrorResponse(ctx, w, toAPIError(ctx, errKMSKeyNotFound), r.URL)
    				return
    			}
    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return
    		}
    	}
    
    	configData, err := xml.Marshal(encConfig)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	// Store the bucket encryption configuration in the object layer
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  8. cmd/bucket-notification-handlers.go

    				// never reach a stage where we will have stale
    				// notification configs.
    			}
    		} else {
    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return
    		}
    	}
    
    	configData, err := xml.Marshal(config)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	writeSuccessResponseXML(w, configData)
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/fake/fake_customresourcedefinition.go

    	if customResourceDefinition == nil {
    		return nil, fmt.Errorf("customResourceDefinition provided to Apply must not be nil")
    	}
    	data, err := json.Marshal(customResourceDefinition)
    	if err != nil {
    		return nil, err
    	}
    	name := customResourceDefinition.Name
    	if name == nil {
    		return nil, fmt.Errorf("customResourceDefinition.Name must be provided to Apply")
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 12:23:16 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  10. cmd/bucket-policy-handlers.go

    		return
    	}
    
    	// Version in policy must not be empty
    	if bucketPolicy.Version == "" {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrPolicyInvalidVersion), r.URL)
    		return
    	}
    
    	configData, err := json.Marshal(bucketPolicy)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	updatedAt, err := globalBucketMetadataSys.Update(ctx, bucket, bucketPolicyConfig, configData)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 6.1K bytes
    - Viewed (0)
Back to top