Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spelling #7507

Merged
merged 34 commits into from
May 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4cee399
spelling: aggregate
jsoref May 10, 2020
084c806
spelling: correctly
jsoref May 10, 2020
0a4dbb1
spelling: delimited
jsoref May 10, 2020
bdf1154
spelling: delivery
jsoref May 10, 2020
8e7922b
spelling: descriptor
jsoref May 10, 2020
5e1a210
spelling: encountered
jsoref May 10, 2020
b0ce632
spelling: hyphen
jsoref May 10, 2020
946aa83
spelling: increment
jsoref May 10, 2020
d38e467
spelling: informations
jsoref May 10, 2020
8c8cacd
spelling: initializing
jsoref May 10, 2020
7e7fa49
spelling: invalid
jsoref May 10, 2020
90cd2d0
spelling: measurement
jsoref May 10, 2020
4dd6ff1
spelling: obfuscated
jsoref May 10, 2020
4b7f9b2
spelling: parser
jsoref May 10, 2020
dca3ffe
spelling: partition
jsoref May 10, 2020
bb422b5
spelling: provisioned
jsoref May 10, 2020
db7fc00
spelling: registry
jsoref May 10, 2020
f8528b3
spelling: separator
jsoref May 10, 2020
401ef3b
spelling: supercalifragilisticexpialidocious
jsoref May 10, 2020
f40a0c5
spelling: synthetic
jsoref May 10, 2020
7222902
spelling: temperature
jsoref May 10, 2020
3facf60
spelling: than
jsoref May 10, 2020
a3d39b5
spelling: series
jsoref May 10, 2020
da55cc6
spelling: status
jsoref May 10, 2020
9adf096
spelling: unexpected
jsoref May 10, 2020
dbe4b61
spelling: uninitialized
jsoref May 10, 2020
576eec0
spelling: unmarshal
jsoref May 10, 2020
37ed672
spelling: unsupported
jsoref May 10, 2020
d9a53c4
spelling: username-or
jsoref May 10, 2020
5678cf7
spelling: wildcard
jsoref May 10, 2020
64aaaf7
spelling: error
jsoref May 10, 2020
e6f9bdf
spelling: gather
jsoref May 10, 2020
4180444
spelling: retrieves
jsoref May 10, 2020
143fde6
spelling: separate
jsoref May 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/tls/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (c *ServerConfig) TLSConfig() (*tls.Config, error) {

if tlsConfig.MinVersion != 0 && tlsConfig.MaxVersion != 0 && tlsConfig.MinVersion > tlsConfig.MaxVersion {
return nil, fmt.Errorf(
"tls min version %q can't be greater then tls max version %q", tlsConfig.MinVersion, tlsConfig.MaxVersion)
"tls min version %q can't be greater than tls max version %q", tlsConfig.MinVersion, tlsConfig.MaxVersion)
}

return tlsConfig, nil
Expand Down
2 changes: 1 addition & 1 deletion internal/tls/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func TestServerConfig(t *testing.T) {
expErr: true,
},
{
name: "TLS Max Version less then TLS Min version",
name: "TLS Max Version less than TLS Min version",
server: tls.ServerConfig{
TLSCert: pki.ServerCertPath(),
TLSKey: pki.ServerKeyPath(),
Expand Down
2 changes: 1 addition & 1 deletion metric/metric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ func TestValueType(t *testing.T) {
assert.Equal(t, telegraf.Gauge, m.Type())
}

func TestCopyAggreate(t *testing.T) {
func TestCopyAggregate(t *testing.T) {
m1 := baseMetric()
m1.SetAggregate(true)
m2 := m1.Copy()
Expand Down
2 changes: 1 addition & 1 deletion models/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func TestFilter_Empty(t *testing.T) {
"foo_bar",
"foo.bar",
"foo-bar",
"supercalifradjulisticexpialidocious",
"supercalifragilisticexpialidocious",
}

for _, measurement := range measurements {
Expand Down
4 changes: 2 additions & 2 deletions plugins/inputs/cloudwatch/cloudwatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func getFilteredMetrics(c *CloudWatch) ([]filteredMetric, error) {
if c.Metrics != nil {
for _, m := range c.Metrics {
metrics := []*cloudwatch.Metric{}
if !hasWilcard(m.Dimensions) {
if !hasWildcard(m.Dimensions) {
dimensions := make([]*cloudwatch.Dimension, len(m.Dimensions))
for k, d := range m.Dimensions {
dimensions[k] = &cloudwatch.Dimension{
Expand Down Expand Up @@ -603,7 +603,7 @@ func (f *metricCache) isValid() bool {
return f.metrics != nil && time.Since(f.built) < f.ttl
}

func hasWilcard(dimensions []*Dimension) bool {
func hasWildcard(dimensions []*Dimension) bool {
for _, d := range dimensions {
if d.Value == "" || d.Value == "*" {
return true
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/eventhub_consumer/eventhub_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func (e *EventHub) onDelivery(
delete(groups, track.ID())
if !ok {
// The metrics should always be found, this message indicates a programming error.
e.Log.Errorf("Could not find delievery: %d", track.ID())
e.Log.Errorf("Could not find delivery: %d", track.ID())
return true
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/fireboard/fireboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (r *Fireboard) Gather(acc telegraf.Accumulator) error {
if resp.StatusCode == http.StatusForbidden {
return fmt.Errorf("fireboard server responded with %d [Forbidden], verify your authToken", resp.StatusCode)
}
return fmt.Errorf("fireboard responded with unexepcted status code %d", resp.StatusCode)
return fmt.Errorf("fireboard responded with unexpected status code %d", resp.StatusCode)
}
// Decode the response JSON into a new stats struct
var stats []fireboardStats
Expand Down
8 changes: 4 additions & 4 deletions plugins/inputs/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type GitHub struct {
HTTPTimeout internal.Duration `toml:"http_timeout"`
githubClient *github.Client

obfusticatedToken string
obfuscatedToken string

RateLimit selfstat.Stat
RateLimitErrors selfstat.Stat
Expand Down Expand Up @@ -67,7 +67,7 @@ func (g *GitHub) createGitHubClient(ctx context.Context) (*github.Client, error)
Timeout: g.HTTPTimeout.Duration,
}

g.obfusticatedToken = "Unauthenticated"
g.obfuscatedToken = "Unauthenticated"

if g.AccessToken != "" {
tokenSource := oauth2.StaticTokenSource(
Expand All @@ -76,7 +76,7 @@ func (g *GitHub) createGitHubClient(ctx context.Context) (*github.Client, error)
oauthClient := oauth2.NewClient(ctx, tokenSource)
ctx = context.WithValue(ctx, oauth2.HTTPClient, oauthClient)

g.obfusticatedToken = g.AccessToken[0:4] + "..." + g.AccessToken[len(g.AccessToken)-3:]
g.obfuscatedToken = g.AccessToken[0:4] + "..." + g.AccessToken[len(g.AccessToken)-3:]

return g.newGithubClient(oauthClient)
}
Expand Down Expand Up @@ -105,7 +105,7 @@ func (g *GitHub) Gather(acc telegraf.Accumulator) error {
g.githubClient = githubClient

tokenTags := map[string]string{
"access_token": g.obfusticatedToken,
"access_token": g.obfuscatedToken,
}

g.RateLimitErrors = selfstat.Register("github", "rate_limit_blocks", tokenTags)
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/kinesis_consumer/kinesis_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func (k *KinesisConsumer) connect(ac telegraf.Accumulator) error {
})
if err != nil {
k.cancel()
k.Log.Errorf("Scan encounterred an error: %s", err.Error())
k.Log.Errorf("Scan encountered an error: %s", err.Error())
k.cons = nil
}
}()
Expand Down
4 changes: 2 additions & 2 deletions plugins/inputs/mailchimp/chimp_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ type Report struct {
Unsubscribed int `json:"unsubscribed"`
SendTime string `json:"send_time"`

TimeSeries []TimeSerie
TimeSeries []TimeSeries
Bounces Bounces `json:"bounces"`
Forwards Forwards `json:"forwards"`
Opens Opens `json:"opens"`
Expand Down Expand Up @@ -237,7 +237,7 @@ type ListStats struct {
ClickRate float64 `json:"click_rate"`
}

type TimeSerie struct {
type TimeSeries struct {
TimeStamp string `json:"timestamp"`
EmailsSent int `json:"emails_sent"`
UniqueOpens int `json:"unique_opens"`
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/mailchimp/mailchimp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func TestMailChimpGatherReport(t *testing.T) {

}

func TestMailChimpGatherErroror(t *testing.T) {
func TestMailChimpGatherError(t *testing.T) {
ts := httptest.NewServer(
http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/marklogic/marklogic.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ type MlHost struct {

// Description of plugin returned
func (c *Marklogic) Description() string {
return "Retrives information on a specific host in a MarkLogic Cluster"
return "Retrieves information on a specific host in a MarkLogic Cluster"
}

var sampleConfig = `
Expand Down
4 changes: 2 additions & 2 deletions plugins/inputs/minecraft/internal/rcon/rcon.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const (

// Rcon package errors.
var (
ErrInvalidWrite = errors.New("Failed to write the payload corretly to remote connection.")
ErrInvalidRead = errors.New("Failed to read the response corretly from remote connection.")
ErrInvalidWrite = errors.New("Failed to write the payload correctly to remote connection.")
ErrInvalidRead = errors.New("Failed to read the response correctly from remote connection.")
ErrInvalidChallenge = errors.New("Server failed to mirror request challenge.")
ErrUnauthorizedRequest = errors.New("Client not authorized to remote server.")
ErrFailedAuthorization = errors.New("Failed to authorize to the remote server.")
Expand Down
4 changes: 2 additions & 2 deletions plugins/inputs/monit/monit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ func TestConnection(t *testing.T) {
}
}

func TestInvalidUsernameorPassword(t *testing.T) {
func TestInvalidUsernameOrPassword(t *testing.T) {

ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

Expand Down Expand Up @@ -624,7 +624,7 @@ func TestInvalidUsernameorPassword(t *testing.T) {
assert.EqualError(t, err, "received status code 401 (Unauthorized), expected 200")
}

func TestNoUsernameorPasswordConfiguration(t *testing.T) {
func TestNoUsernameOrPasswordConfiguration(t *testing.T) {

ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/mqtt_consumer/mqtt_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func (m *MQTTConsumer) createOpts() (*mqtt.ClientOptions, error) {
}

if len(m.Servers) == 0 {
return opts, fmt.Errorf("could not get host infomations")
return opts, fmt.Errorf("could not get host informations")
}

for _, server := range m.Servers {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ func TestGatherHttpLocationZonesMetrics(t *testing.T) {
})
}

func TestHatherHttpUpstreamsMetrics(t *testing.T) {
func TestGatherHttpUpstreamsMetrics(t *testing.T) {
ts, n := prepareEndpoint(t, httpUpstreamsPath, defaultApiVersion, httpUpstreamsPayload)
defer ts.Close()

Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/openntpd/openntpd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func TestParseSimpleOutputwithStatePrefix(t *testing.T) {
acc.AssertContainsTaggedFields(t, "openntpd", firstpeerfields, firstpeertags)
}

func TestParseSimpleOutputInavlidPeer(t *testing.T) {
func TestParseSimpleOutputInvalidPeer(t *testing.T) {
acc := &testutil.Accumulator{}
v := &Openntpd{
run: OpenntpdCTL(simpleOutputInvalidPeer, TestTimeout, false),
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/puppetagent/puppetagent.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (pa *PuppetAgent) SampleConfig() string {

// Description returns description of PuppetAgent plugin
func (pa *PuppetAgent) Description() string {
return `Reads last_run_summary.yaml file and converts to measurments`
return `Reads last_run_summary.yaml file and converts to measurements`
}

// Gather reads stats from all configured servers accumulates stats
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/riak/riak.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (r *Riak) gatherServer(s string, acc telegraf.Accumulator) error {

// Successful responses will always return status code 200
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("riak responded with unexepcted status code %d", resp.StatusCode)
return fmt.Errorf("riak responded with unexpected status code %d", resp.StatusCode)
}

// Decode the response JSON into a new stats struct
Expand Down
6 changes: 3 additions & 3 deletions plugins/inputs/smart/smart.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ var (
"Available Spare": {
Name: "Available_Spare",
Parse: func(fields, deviceFields map[string]interface{}, str string) error {
return parseCommaSeperatedInt(fields, deviceFields, strings.TrimSuffix(str, "%"))
return parseCommaSeparatedInt(fields, deviceFields, strings.TrimSuffix(str, "%"))
},
},
}
Expand Down Expand Up @@ -360,7 +360,7 @@ func gatherDisk(acc telegraf.Accumulator, timeout internal.Duration, usesudo, co
tags["id"] = attr.ID
}

parse := parseCommaSeperatedInt
parse := parseCommaSeparatedInt
if attr.Parse != nil {
parse = attr.Parse
}
Expand Down Expand Up @@ -421,7 +421,7 @@ func parseInt(str string) int64 {
return 0
}

func parseCommaSeperatedInt(fields, _ map[string]interface{}, str string) error {
func parseCommaSeparatedInt(fields, _ map[string]interface{}, str string) error {
i, err := strconv.ParseInt(strings.Replace(str, ",", "", -1), 10, 64)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/smart/smart_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ Transport protocol: SAS (SPL-3)
Local Time is: Wed Apr 17 15:01:28 2019 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Temp$rature Warning: Disabled or Not Supported
Temperature Warning: Disabled or Not Supported
=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK
Expand Down
8 changes: 4 additions & 4 deletions plugins/inputs/solr/solr.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func addAdminCoresStatusToAcc(acc telegraf.Accumulator, adminCoreStatus *AdminCo
func addCoreMetricsToAcc(acc telegraf.Accumulator, core string, mBeansData *MBeansData, time time.Time) error {
var coreMetrics map[string]Core
if len(mBeansData.SolrMbeans) < 2 {
return fmt.Errorf("no core metric data to unmarshall")
return fmt.Errorf("no core metric data to unmarshal")
}
if err := json.Unmarshal(mBeansData.SolrMbeans[1], &coreMetrics); err != nil {
return err
Expand Down Expand Up @@ -257,7 +257,7 @@ func addQueryHandlerMetricsToAcc(acc telegraf.Accumulator, core string, mBeansDa
var queryMetrics map[string]QueryHandler

if len(mBeansData.SolrMbeans) < 4 {
return fmt.Errorf("no query handler metric data to unmarshall")
return fmt.Errorf("no query handler metric data to unmarshal")
}

if err := json.Unmarshal(mBeansData.SolrMbeans[3], &queryMetrics); err != nil {
Expand Down Expand Up @@ -332,7 +332,7 @@ func addUpdateHandlerMetricsToAcc(acc telegraf.Accumulator, core string, mBeansD
var updateMetrics map[string]UpdateHandler

if len(mBeansData.SolrMbeans) < 6 {
return fmt.Errorf("no update handler metric data to unmarshall")
return fmt.Errorf("no update handler metric data to unmarshal")
}
if err := json.Unmarshal(mBeansData.SolrMbeans[5], &updateMetrics); err != nil {
return err
Expand Down Expand Up @@ -410,7 +410,7 @@ func getInt(unk interface{}) int64 {
// Add cache metrics section to accumulator
func addCacheMetricsToAcc(acc telegraf.Accumulator, core string, mBeansData *MBeansData, time time.Time) error {
if len(mBeansData.SolrMbeans) < 8 {
return fmt.Errorf("no cache metric data to unmarshall")
return fmt.Errorf("no cache metric data to unmarshal")
}
var cacheMetrics map[string]Cache
if err := json.Unmarshal(mBeansData.SolrMbeans[7], &cacheMetrics); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/stackdriver/stackdriver.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (c *stackdriverMetricClient) ListMetricDescriptors(
mdDesc, mdErr := mdResp.Next()
if mdErr != nil {
if mdErr != iterator.Done {
c.log.Errorf("Failed iterating metric desciptor responses: %q: %v", req.String(), mdErr)
c.log.Errorf("Failed iterating metric descriptor responses: %q: %v", req.String(), mdErr)
}
break
}
Expand Down
4 changes: 2 additions & 2 deletions plugins/inputs/tengine/tengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (n *Tengine) createHttpClient() (*http.Client, error) {
return client, nil
}

type TengineSatus struct {
type TengineStatus struct {
host string
bytes_in uint64
bytes_out uint64
Expand Down Expand Up @@ -135,7 +135,7 @@ type TengineSatus struct {
}

func (n *Tengine) gatherUrl(addr *url.URL, acc telegraf.Accumulator) error {
var tenginestatus TengineSatus
var tenginestatus TengineStatus
resp, err := n.client.Get(addr.String())
if err != nil {
return fmt.Errorf("error making HTTP request to %s: %s", addr.String(), err)
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/varnish/varnish_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ MAIN.s_req 0 0.00 Total requests seen
MAIN.s_pipe 0 0.00 Total pipe sessions seen
MAIN.s_pass 0 0.00 Total pass-ed requests seen
MAIN.s_fetch 0 0.00 Total backend fetches initiated
MAIN.s_synth 0 0.00 Total synthethic responses made
MAIN.s_synth 0 0.00 Total synthetic responses made
MAIN.s_req_hdrbytes 0 0.00 Request header bytes
MAIN.s_req_bodybytes 0 0.00 Request body bytes
MAIN.s_resp_hdrbytes 0 0.00 Response header bytes
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/vsphere/vsphere_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func defaultVSphere() *VSphere {
VMInclude: []string{"/**"},
DatastoreMetricInclude: []string{
"disk.used.*",
"disk.provsioned.*"},
"disk.provisioned.*"},
DatastoreMetricExclude: nil,
DatastoreInclude: []string{"/**"},
DatacenterMetricInclude: nil,
Expand Down
10 changes: 5 additions & 5 deletions plugins/inputs/win_perf_counters/performance_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (m *PerformanceQueryImpl) Open() error {
// Close closes the counterPath, releases associated counter handles and frees resources
func (m *PerformanceQueryImpl) Close() error {
if m.query == 0 {
return errors.New("uninitialised query")
return errors.New("uninitialized query")
}

if ret := PdhCloseQuery(m.query); ret != ERROR_SUCCESS {
Expand All @@ -87,7 +87,7 @@ func (m *PerformanceQueryImpl) Close() error {
func (m *PerformanceQueryImpl) AddCounterToQuery(counterPath string) (PDH_HCOUNTER, error) {
var counterHandle PDH_HCOUNTER
if m.query == 0 {
return 0, errors.New("uninitialised query")
return 0, errors.New("uninitialized query")
}

if ret := PdhAddCounter(m.query, counterPath, 0, &counterHandle); ret != ERROR_SUCCESS {
Expand All @@ -99,7 +99,7 @@ func (m *PerformanceQueryImpl) AddCounterToQuery(counterPath string) (PDH_HCOUNT
func (m *PerformanceQueryImpl) AddEnglishCounterToQuery(counterPath string) (PDH_HCOUNTER, error) {
var counterHandle PDH_HCOUNTER
if m.query == 0 {
return 0, errors.New("uninitialised query")
return 0, errors.New("uninitialized query")
}
if ret := PdhAddEnglishCounter(m.query, counterPath, 0, &counterHandle); ret != ERROR_SUCCESS {
return 0, NewPdhError(ret)
Expand Down Expand Up @@ -184,7 +184,7 @@ func (m *PerformanceQueryImpl) GetFormattedCounterArrayDouble(hCounter PDH_HCOUN
func (m *PerformanceQueryImpl) CollectData() error {
var ret uint32
if m.query == 0 {
return errors.New("uninitialised query")
return errors.New("uninitialized query")
}

if ret = PdhCollectQueryData(m.query); ret != ERROR_SUCCESS {
Expand All @@ -195,7 +195,7 @@ func (m *PerformanceQueryImpl) CollectData() error {

func (m *PerformanceQueryImpl) CollectDataWithTime() (time.Time, error) {
if m.query == 0 {
return time.Now(), errors.New("uninitialised query")
return time.Now(), errors.New("uninitialized query")
}
ret, mtime := PdhCollectQueryDataWithTime(m.query)
if ret != ERROR_SUCCESS {
Expand Down
Loading