Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for str (0.13 sec)

  1. internal/config/bool-flag_test.go

    		expectedResult string
    	}{
    		{bf, "off"},
    		{BoolFlag(true), "on"},
    		{BoolFlag(false), "off"},
    	}
    
    	for _, testCase := range testCases {
    		str := testCase.flag.String()
    		if testCase.expectedResult != str {
    			t.Fatalf("expected: %v, got: %v", testCase.expectedResult, str)
    		}
    	}
    }
    
    // Test BoolFlag.MarshalJSON()
    func TestBoolFlagMarshalJSON(t *testing.T) {
    	var bf BoolFlag
    
    	testCases := []struct {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 3.5K bytes
    - Viewed (0)
Back to top