File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,6 @@ pkg/util/procfs
234
234
pkg/util/removeall
235
235
pkg/util/rlimit
236
236
pkg/util/selinux
237
- pkg/util/sysctl/testing
238
237
pkg/util/taints
239
238
pkg/volume
240
239
pkg/volume/azure_dd
Original file line number Diff line number Diff line change @@ -22,30 +22,31 @@ import (
22
22
"k8s.io/kubernetes/pkg/util/sysctl"
23
23
)
24
24
25
- // fake is a map-backed implementation of sysctl.Interface, for testing/mocking
26
- type fake struct {
25
+ // Fake is a map-backed implementation of sysctl.Interface, for testing/mocking.
26
+ type Fake struct {
27
27
Settings map [string ]int
28
28
}
29
29
30
- func NewFake () * fake {
31
- return & fake {
30
+ // NewFake creates a fake sysctl implementation.
31
+ func NewFake () * Fake {
32
+ return & Fake {
32
33
Settings : make (map [string ]int ),
33
34
}
34
35
}
35
36
36
- // GetSysctl returns the value for the specified sysctl setting
37
- func (m * fake ) GetSysctl (sysctl string ) (int , error ) {
37
+ // GetSysctl returns the value for the specified sysctl setting.
38
+ func (m * Fake ) GetSysctl (sysctl string ) (int , error ) {
38
39
v , found := m .Settings [sysctl ]
39
40
if ! found {
40
41
return - 1 , os .ErrNotExist
41
42
}
42
43
return v , nil
43
44
}
44
45
45
- // SetSysctl modifies the specified sysctl flag to the new value
46
- func (m * fake ) SetSysctl (sysctl string , newVal int ) error {
46
+ // SetSysctl modifies the specified sysctl flag to the new value.
47
+ func (m * Fake ) SetSysctl (sysctl string , newVal int ) error {
47
48
m .Settings [sysctl ] = newVal
48
49
return nil
49
50
}
50
51
51
- var _ = sysctl .Interface (& fake {})
52
+ var _ = sysctl .Interface (& Fake {})
You can’t perform that action at this time.
0 commit comments