From 79c93907bdca925573f3dbb77939264baaa70fd7 Mon Sep 17 00:00:00 2001 From: Connor Doyle Date: Fri, 26 Feb 2016 17:33:56 -0800 Subject: [PATCH] Fixes typos in comments and literals. --- control/plugin/cpolicy/node.go | 2 +- control/plugin/plugin.go | 2 +- control/strategy/strategy.go | 2 +- core/cdata/node.go | 2 +- core/ctypes/ctypes.go | 2 +- core/plugin_test.go | 2 +- pkg/schedule/schedule.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/control/plugin/cpolicy/node.go b/control/plugin/cpolicy/node.go index b593e3bdc..968f520da 100644 --- a/control/plugin/cpolicy/node.go +++ b/control/plugin/cpolicy/node.go @@ -199,7 +199,7 @@ func (c ConfigPolicyNode) Merge(n ctree.Node) ctree.Node { // are safe to convert ctree.Node interface to ConfigPolicyNode cd := n.(*ConfigPolicyNode) // For the rules in the passed ConfigPolicyNode(converted) add each rule to - // this ConfigPolicyNode overwritting where needed. + // this ConfigPolicyNode overwriting where needed. for _, r := range cd.rules { c.Add(r) } diff --git a/control/plugin/plugin.go b/control/plugin/plugin.go index 21d33a47b..e5f76d845 100644 --- a/control/plugin/plugin.go +++ b/control/plugin/plugin.go @@ -90,7 +90,7 @@ var ( // Timeout settings // How much time must elapse before a lack of Ping results in a timeout PingTimeoutDurationDefault = time.Millisecond * 1500 - // How many succesive PingTimeouts must occur to equal a failure. + // How many successive PingTimeouts must occur to equal a failure. PingTimeoutLimit = 3 // Array matching plugin type enum to a string diff --git a/control/strategy/strategy.go b/control/strategy/strategy.go index 2445d68fb..e6f75d561 100644 --- a/control/strategy/strategy.go +++ b/control/strategy/strategy.go @@ -17,7 +17,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package strategy provides basic interfaces for routing to availble +// Package strategy provides basic interfaces for routing to available // plugins and caching metric data. package strategy diff --git a/core/cdata/node.go b/core/cdata/node.go index d3ea45253..3aa22d5c9 100644 --- a/core/cdata/node.go +++ b/core/cdata/node.go @@ -132,7 +132,7 @@ func (c ConfigDataNode) Merge(n ctree.Node) ctree.Node { cd := n.(*ConfigDataNode) t := cd.Table() // For the table in the passed ConfigDataNode(converted) add each item to - // this ConfigDataNode overwritting where needed. + // this ConfigDataNode overwriting where needed. for k, v := range t { c.AddItem(k, v) } diff --git a/core/ctypes/ctypes.go b/core/ctypes/ctypes.go index 8b6db4c83..5bbe4d296 100644 --- a/core/ctypes/ctypes.go +++ b/core/ctypes/ctypes.go @@ -77,7 +77,7 @@ func (c ConfigValueBool) MarshalJSON() ([]byte, error) { // Returns a slice of string keywords for the types supported by ConfigValue. func SupportedTypes() []string { - // This is kind of a hack but keeps the definiton of types here in + // This is kind of a hack but keeps the definition of types here in // ctypes.go. If you create a new ConfigValue type be sure and add here // to return the Type() response. This will cause any depedant components // to acknowledge and use that type. diff --git a/core/plugin_test.go b/core/plugin_test.go index 1105efa49..9fd124f41 100644 --- a/core/plugin_test.go +++ b/core/plugin_test.go @@ -93,7 +93,7 @@ func TestRequestedPlugin(t *testing.T) { }) // Try to create a plugin request from a bad path to a plugin _, err2 := NewRequestedPlugin(PluginPath + "foo") - Convey("An error should be generated when creating a plugin request with non-existant path", t, func() { + Convey("An error should be generated when creating a plugin request with non-existent path", t, func() { Convey("So error should not be nil", func() { So(err2, ShouldNotBeNil) }) diff --git a/pkg/schedule/schedule.go b/pkg/schedule/schedule.go index 37d5a3c56..45e737420 100644 --- a/pkg/schedule/schedule.go +++ b/pkg/schedule/schedule.go @@ -61,7 +61,7 @@ func waitOnInterval(last time.Time, i time.Duration) (uint, time.Time) { nanoInterval := i.Nanoseconds() // use modulo operation to obtain the remainder of time over last interval remainder := timeDiff % nanoInterval - // substract remainder from + // subtract remainder from missed := (timeDiff - remainder) / nanoInterval // timeDiff.Nanoseconds() % s.Interval.Nanoseconds() waitDuration := nanoInterval - remainder // Wait until predicted interval fires