Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for printYAML (0.21 sec)

  1. istioctl/pkg/util/formatting/formatter.go

    func Print(ms diag.Messages, format string, colorize bool) (string, error) {
    	switch format {
    	case LogFormat:
    		return printLog(ms, colorize), nil
    	case JSONFormat:
    		return printJSON(ms)
    	case YAMLFormat:
    		return printYAML(ms)
    	default:
    		return "", fmt.Errorf("invalid format, expected one of %v but got %q", MsgOutputFormatKeys, format)
    	}
    }
    
    func printLog(ms diag.Messages, colorize bool) string {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Jul 11 02:41:45 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  2. istioctl/pkg/util/formatting/formatter_test.go

    		"level": "Warning",
    		"message": "Collapse danger: the castle is too old",
    		"origin": "GrandCastle"
    	}
    ]`
    
    	g.Expect(output).To(Equal(expectedOutput))
    }
    
    func TestFormatter_PrintYAML(t *testing.T) {
    	g := NewWithT(t)
    
    	firstMsg := diag.NewMessage(
    		diag.NewMessageType(diag.Error, "B1", "Explosion accident: %v"),
    		diag.MockResource("SoapBubble"),
    		"the bubble is too big",
    	)
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Oct 31 14:48:28 GMT 2023
    - 4.1K bytes
    - Viewed (0)
Back to top