Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for flagsToInt (0.14 sec)

  1. cmd/kubeadm/app/cmd/phases/reset/unmount_linux.go

    	kubeadmapi.UnmountFlagMNTDetach:      unix.MNT_DETACH,
    	kubeadmapi.UnmountFlagMNTExpire:      unix.MNT_EXPIRE,
    	kubeadmapi.UnmountFlagUmountNoFollow: unix.UMOUNT_NOFOLLOW,
    }
    
    func flagsToInt(flags []string) int {
    	res := 0
    	for _, f := range flags {
    		res |= flagMap[f]
    	}
    	return res
    }
    
    // unmountKubeletDirectory unmounts all paths that contain KubeletRunDirectory
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 05 10:58:44 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/cmd/phases/reset/unmount_linux_test.go

    				kubeadmapi.UnmountFlagMNTExpire,
    				kubeadmapi.UnmountFlagUmountNoFollow,
    			},
    			expectedOutput: 15,
    		},
    	}
    
    	for _, tc := range tests {
    		t.Run(tc.name, func(t *testing.T) {
    			out := flagsToInt(tc.input)
    			if tc.expectedOutput != out {
    				t.Errorf("expected output %d, got %d", tc.expectedOutput, out)
    			}
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 05 10:58:44 UTC 2024
    - 1.4K bytes
    - Viewed (0)
Back to top