Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestBoolFlagUnmarshalJSON (0.2 sec)

  1. internal/config/bool-flag_test.go

    		if testCase.expectedResult != string(data) {
    			t.Fatalf("expected: %v, got: %v", testCase.expectedResult, string(data))
    		}
    	}
    }
    
    // Test BoolFlag.UnmarshalJSON()
    func TestBoolFlagUnmarshalJSON(t *testing.T) {
    	testCases := []struct {
    		data           []byte
    		expectedResult BoolFlag
    		expectedErr    bool
    	}{
    		{[]byte(`{}`), BoolFlag(false), true},
    		{[]byte(`["on"]`), BoolFlag(false), true},
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 3.5K bytes
    - Viewed (0)
Back to top