Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for MarshalIndent (0.24 sec)

  1. istioctl/pkg/admin/istiodconfig.go

    		for _, sll := range resultScopeLogLevel {
    			_, _ = fmt.Fprintf(w, "%s\t%s\t%s\n", sll.ScopeName, sll.Description, sll.LogLevel)
    		}
    		return w.Flush()
    	case "json", "yaml":
    		outputBytes, err := json.MarshalIndent(&resultScopeLogLevel, "", "  ")
    		outputBytes = append(outputBytes, []byte("\n")...)
    		if err != nil {
    			return err
    		}
    		if ga.outputFormat == "yaml" {
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Sat Apr 13 05:23:38 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  2. istioctl/pkg/writer/envoy/configdump/listener.go

    	}
    	filteredListeners := proto.MessageSlice{}
    	for _, listener := range listeners {
    		if filter.Verify(listener) {
    			filteredListeners = append(filteredListeners, listener)
    		}
    	}
    	out, err := json.MarshalIndent(filteredListeners, "", "    ")
    	if err != nil {
    		return fmt.Errorf("failed to marshal listeners: %v", err)
    	}
    	if outputFormat == "yaml" {
    		if out, err = yaml.JSONToYAML(out); err != nil {
    			return err
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Nov 29 12:37:14 UTC 2023
    - 18.1K bytes
    - Viewed (0)
  3. cmd/background-newdisks-heal-ops.go

    			h.QueuedBuckets = append(h.QueuedBuckets, b.Name)
    		}
    	}
    }
    
    func (h *healingTracker) printTo(writer io.Writer) {
    	h.mu.RLock()
    	defer h.mu.RUnlock()
    
    	b, err := json.MarshalIndent(h, "", "  ")
    	if err != nil {
    		writer.Write([]byte(err.Error()))
    		return
    	}
    	writer.Write(b)
    }
    
    // toHealingDisk converts the information to madmin.HealingDisk
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Oct 26 09:58:27 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  4. internal/bucket/object/lock/lock_test.go

    			expectedErr: fmt.Errorf("Default retention period too large for 'Days' %d", invalidDays),
    			expectErr:   true,
    		},
    	}
    	for _, tt := range tests {
    		d, err := xml.MarshalIndent(&tt.value, "", "\t")
    		if err != nil {
    			t.Fatal(err)
    		}
    		var dr DefaultRetention
    		err = xml.Unmarshal(d, &dr)
    		//nolint:gocritic
    		if tt.expectedErr == nil {
    			if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 29 01:20:27 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  5. istioctl/pkg/tag/tag.go

    		fmt.Fprintf(w, "%s\t%s\t%s\n", t.Tag, t.Revision, strings.Join(t.Namespaces, ","))
    	}
    
    	return w.Flush()
    }
    
    func printJSONYAML(w io.Writer, res any, outformat string) error {
    	out, err := json.MarshalIndent(res, "", "\t")
    	if err != nil {
    		return fmt.Errorf("error while marshaling to JSON: %v", err)
    	}
    	if outformat == util.YamlFormat {
    		if out, err = yaml.JSONToYAML(out); err != nil {
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Mon Jul 22 15:40:30 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  6. docs/debugging/xl-meta/main.go

    			dec := json.NewDecoder(buf)
    			// Use number to preserve integers.
    			dec.UseNumber()
    			err = dec.Decode(&msi)
    			if err != nil {
    				return nil, err
    			}
    			b, err = json.MarshalIndent(msi, "", "  ")
    			if err != nil {
    				return nil, err
    			}
    			return b, nil
    		}
    
    		args := c.Args()
    		if len(args) == 0 {
    			// If no args, assume xl.meta
    			args = []string{"xl.meta"}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 05 11:57:44 UTC 2024
    - 40.3K bytes
    - Viewed (0)
Back to top