@@ -10,11 +10,11 @@ import (
1010// Rule is an interface defining the two functions needed for pod reaper to use the rule.
1111type Rule interface {
1212
13- // load attempts to load the load and returns whether or the not the rule was loaded, a message that will be logged
13+ // load attempts to load the load and returns whether the rule was loaded, a message that will be logged
1414 // when the rule is loaded, and any error that may have occurred during the load.
1515 load () (bool , string , error )
1616
17- // ShouldReap takes a pod and returns whether or not the pod should be reaped based on this rule and a message that
17+ // ShouldReap takes a pod and returns whether the pod should be reaped based on this rule and a message that
1818 // will be logged when the pod is selected for reaping.
1919 ShouldReap (pod v1.Pod ) (bool , string )
2020}
@@ -24,7 +24,7 @@ type Rules struct {
2424 LoadedRules []Rule
2525}
2626
27- // LoadRules load all of the rules based on their own implementations
27+ // LoadRules load all the rules based on their own implementations
2828func LoadRules () (Rules , error ) {
2929 // load all possible rules
3030 rules := []Rule {
@@ -45,14 +45,14 @@ func LoadRules() (Rules, error) {
4545 loadedRules = append (loadedRules , rule )
4646 }
4747 }
48- // return an err if no rules where loaded
48+ // return an error if no rules where loaded
4949 if len (loadedRules ) == 0 {
5050 return Rules {LoadedRules : loadedRules }, errors .New ("no rules were loaded" )
5151 }
5252 return Rules {LoadedRules : loadedRules }, nil
5353}
5454
55- // ShouldReap takes a pod and return whether or not the pod should be reaped based on this rule.
55+ // ShouldReap takes a pod and return whether the pod should be reaped based on this rule.
5656// Also includes a message describing why the pod was flagged for reaping.
5757func (rules Rules ) ShouldReap (pod v1.Pod ) (bool , []string ) {
5858 var reasons []string
0 commit comments