diff --git a/Makefile b/Makefile index 66dcb3c2db..bd01017f67 100644 --- a/Makefile +++ b/Makefile @@ -140,7 +140,7 @@ fuzz: ## run all fuzz tests lint: build staticcheck ## run all linters .PHONY: clean -clean: ## clean temorary files and driectories +clean: ## clean temporary files and directories go clean -i -cache -testcache rm -rf .coverprofile-all .cover rm -f ./_test_plugins/*.so diff --git a/config/config.go b/config/config.go index 87a68d155d..85687b2222 100644 --- a/config/config.go +++ b/config/config.go @@ -367,8 +367,8 @@ func NewConfig() *Config { flag.BoolVar(&cfg.ServeRouteCounter, "serve-route-counter", false, "enables reporting counting metrics for each route. Has the route, HTTP method and status code as labels. Currently just implemented for the Prometheus metrics flavour") flag.BoolVar(&cfg.ServeHostMetrics, "serve-host-metrics", false, "enables reporting total serve time metrics for each host") flag.BoolVar(&cfg.ServeHostCounter, "serve-host-counter", false, "enables reporting counting metrics for each host. Has the route, HTTP method and status code as labels. Currently just implemented for the Prometheus metrics flavour") - flag.BoolVar(&cfg.ServeMethodMetric, "serve-method-metric", true, "enables the HTTP method as a domain of the total serve time metric. It affects both route and host splitted metrics") - flag.BoolVar(&cfg.ServeStatusCodeMetric, "serve-status-code-metric", true, "enables the HTTP response status code as a domain of the total serve time metric. It affects both route and host splitted metrics") + flag.BoolVar(&cfg.ServeMethodMetric, "serve-method-metric", true, "enables the HTTP method as a domain of the total serve time metric. It affects both route and host split metrics") + flag.BoolVar(&cfg.ServeStatusCodeMetric, "serve-status-code-metric", true, "enables the HTTP response status code as a domain of the total serve time metric. It affects both route and host split metrics") flag.BoolVar(&cfg.BackendHostMetrics, "backend-host-metrics", false, "enables reporting total serve time metrics for each backend") flag.BoolVar(&cfg.AllFiltersMetrics, "all-filters-metrics", false, "enables reporting combined filter metrics for each route") flag.BoolVar(&cfg.CombinedResponseMetrics, "combined-response-metrics", false, "enables reporting combined response time metrics") diff --git a/config/defaultfilterflags_test.go b/config/defaultfilterflags_test.go index f79d833304..716bdbf8b1 100644 --- a/config/defaultfilterflags_test.go +++ b/config/defaultfilterflags_test.go @@ -73,7 +73,7 @@ func Test_defaultFiltersFlags_Set(t *testing.T) { } if !tt.wantErr { if len(tt.want) != len(dpf.filters) { - t.Errorf("defaultFiltersFlags size missmatch got %d want %d", len(dpf.filters), len(tt.want)) + t.Errorf("defaultFiltersFlags size mismatch got %d want %d", len(dpf.filters), len(tt.want)) } if err := yaml.Unmarshal([]byte(tt.args), dpf); err != nil { @@ -81,7 +81,7 @@ func Test_defaultFiltersFlags_Set(t *testing.T) { } if len(tt.want) != len(dpf.filters) { - t.Errorf("defaultFiltersFlags from yaml size missmatch got %d want %d", len(dpf.filters), len(tt.want)) + t.Errorf("defaultFiltersFlags from yaml size mismatch got %d want %d", len(dpf.filters), len(tt.want)) } } }) diff --git a/config/listflag_test.go b/config/listflag_test.go index 4b3199eb1e..85db76ae60 100644 --- a/config/listflag_test.go +++ b/config/listflag_test.go @@ -109,7 +109,7 @@ func TestListFlag(t *testing.T) { }) t.Run("unmarshal error", func(t *testing.T) { - const input = "invlaid yaml" + const input = "invalid yaml" current := commaListFlag() if err := yaml.Unmarshal([]byte(input), current); err == nil { t.Errorf("Failed to get error from Unmarshal() for invalid input: %q", input) diff --git a/dataclients/kubernetes/kube.go b/dataclients/kubernetes/kube.go index 0fe003dbb3..6e7a785d91 100644 --- a/dataclients/kubernetes/kube.go +++ b/dataclients/kubernetes/kube.go @@ -202,7 +202,7 @@ type Options struct { BackendNameTracingTag bool // OnlyAllowedExternalNames will enable validation of ingress external names and route groups network - // backend addresses, explicit LB endpoints validation agains the list of patterns in + // backend addresses, explicit LB endpoints validation against the list of patterns in // AllowedExternalNames. OnlyAllowedExternalNames bool diff --git a/dataclients/kubernetes/kube_test.go b/dataclients/kubernetes/kube_test.go index d7d815b2ee..28bcd23349 100644 --- a/dataclients/kubernetes/kube_test.go +++ b/dataclients/kubernetes/kube_test.go @@ -713,7 +713,7 @@ func TestIngress(t *testing.T) { r, d, err := dc.LoadUpdate() if err != nil || len(d) != 0 { - t.Error("udpate failed") + t.Error("update failed") } checkRoutes(t, r, map[string]string{ diff --git a/dataclients/kubernetes/routegroup.go b/dataclients/kubernetes/routegroup.go index 80e6aca310..2a68318d88 100644 --- a/dataclients/kubernetes/routegroup.go +++ b/dataclients/kubernetes/routegroup.go @@ -426,7 +426,7 @@ func transformExplicitGroupRoute(ctx *routeContext) (*eskip.Route, error) { gr := ctx.groupRoute r := &eskip.Route{Id: ctx.id} - // Path or PathSubtree, prefer Path if we have, because it is more specifc + // Path or PathSubtree, prefer Path if we have, because it is more specific if gr.Path != "" { r.Predicates = appendPredicate(r.Predicates, "Path", gr.Path) } else if gr.PathSubtree != "" { diff --git a/dataclients/kubernetes/testdata/routegroups/default-filters/failure-opening-default-filters-dir.md b/dataclients/kubernetes/testdata/routegroups/default-filters/failure-opening-default-filters-dir.md index 1e6327f466..96cd3b22d3 100644 --- a/dataclients/kubernetes/testdata/routegroups/default-filters/failure-opening-default-filters-dir.md +++ b/dataclients/kubernetes/testdata/routegroups/default-filters/failure-opening-default-filters-dir.md @@ -1,3 +1,3 @@ ### Note -In this test the directory is a file, so that readdir() fails. Error should be loged. +In this test the directory is a file, so that readdir() fails. Error should be logged. diff --git a/docs/kubernetes/ingress-usage.md b/docs/kubernetes/ingress-usage.md index e807f25478..e21fc33193 100644 --- a/docs/kubernetes/ingress-usage.md +++ b/docs/kubernetes/ingress-usage.md @@ -254,7 +254,7 @@ Custom routes specified in ingress will always add the `Host()` [predicate](../reference/predicates.md#host) to match the host header specified in the ingress `rules:`. If there is a `path:` definition in your ingress, then it will be based on the skipper command line parameter -`-kubernetes-path-mode` set one of theses predicates: +`-kubernetes-path-mode` set one of these predicates: - [Path()](../reference/predicates.md#path) - [PathSubtree()](../reference/predicates.md#pathsubtree) @@ -672,7 +672,7 @@ and in our [ratelimit tutorial](../tutorials/ratelimit.md). #### Client Ratelimits The example shows 20 calls per hour per client, based on -X-Forwarded-For header or IP incase there is no X-Forwarded-For header +X-Forwarded-For header or IP in case there is no X-Forwarded-For header set, are allowed to each skipper instance for the given ingress. ```yaml diff --git a/docs/operation/operation.md b/docs/operation/operation.md index 65fc902cf4..b8936417c8 100644 --- a/docs/operation/operation.md +++ b/docs/operation/operation.md @@ -49,7 +49,7 @@ the number for all backends such that we do not run out of sockets. This will set DisableKeepAlives on the [http.Transport](https://golang.org/pkg/net/http/#Transport) to disable -HTTP keep-alives and to only use the connection for single request. +HTTP keep-alive and to only use the connection for single request. -max-idle-connection-backend int sets the maximum idle connections for all backend connections diff --git a/docs/reference/development.md b/docs/reference/development.md index bd5d43f8b2..7827a5792f 100644 --- a/docs/reference/development.md +++ b/docs/reference/development.md @@ -1,6 +1,6 @@ ## How to develop a Filter -A filter is part of a route and can change arbitary http data in the +A filter is part of a route and can change arbitrary http data in the `http.Request` and `http.Response` path of a proxy. The filter example shows a non trivial diff of a filter diff --git a/docs/reference/filters.md b/docs/reference/filters.md index 036a0a3a2d..2e569446b9 100644 --- a/docs/reference/filters.md +++ b/docs/reference/filters.md @@ -964,7 +964,7 @@ The content type will be automatically detected when not provided. Block a request based on it's body content. -The filter max buffer size is 2MiB by default and can be overidden with `-max-matcher-buffer-size=`. +The filter max buffer size is 2MiB by default and can be overridden with `-max-matcher-buffer-size=`. Parameters: @@ -980,7 +980,7 @@ Example: Block a request based on it's body content. -The filter max buffer size is 2MiB by default and can be overidden with `-max-matcher-buffer-size=`. +The filter max buffer size is 2MiB by default and can be overridden with `-max-matcher-buffer-size=`. Parameters: @@ -995,7 +995,7 @@ Example: ### sed -The filter sed replaces all occurences of a pattern with a replacement string +The filter sed replaces all occurrences of a pattern with a replacement string in the response body. Example: @@ -1011,7 +1011,7 @@ editorRoute: * -> sed("foo", "bar", 64000000) -> "https://www.example.org"; ``` This filter expects a regexp pattern and a replacement string as arguments. -During the streaming of the response body, every occurence of the pattern will +During the streaming of the response body, every occurrence of the pattern will be replaced with the replacement string. The editing doesn't happen right when the filter is executed, only later when the streaming normally happens, after all response filters were called. @@ -1661,7 +1661,7 @@ oidcClaimsQuery(":[]", ...) ``` The filter is chained after `oauthOidc*` authentication as it parses the ID token that has been saved in the internal `StateBag` for this request. It validates access control of the requested path against the defined query. -It accepts one or more arguments, thats is a path prefix which is granted access to when the query definition evaluates positive. +It accepts one or more arguments, that is a path prefix which is granted access to when the query definition evaluates positive. It supports exact matches of keys, key-value pairs, introspecting of arrays or exact and wildcard matching of nested structures. The query definition can be one or more queries per path, space delimited. The query syntax is [GJSON](https://github.com/tidwall/gjson/blob/master/SYNTAX.md) with a convenience modifier of `@_` which unfolds to `[@this].#("+arg+")` @@ -2225,7 +2225,7 @@ This enables logs of all requests with status codes `1xxs`, `301` and all `20xs` ### auditLog Filter `auditLog()` logs the request and N bytes of the body into the -log file. N defaults to 1024 and can be overidden with +log file. N defaults to 1024 and can be overridden with `-max-audit-body=`. `N=0` omits logging the body. Example: diff --git a/docs/reference/predicates.md b/docs/reference/predicates.md index d6781e8182..f1014326c5 100644 --- a/docs/reference/predicates.md +++ b/docs/reference/predicates.md @@ -530,7 +530,7 @@ Examples: Cron("* * * * *") // match only when the hour is between 5-7 (inclusive) Cron("* 5-7, * * *") -// match only when the hour is between 5-7, equal to 8, or betweeen 12-15 +// match only when the hour is between 5-7, equal to 8, or between 12-15 Cron("* 5-7,8,12-15 * * *") // match only when it is weekdays Cron("* * * * 1-5") @@ -664,7 +664,7 @@ ignoring the chance argument. Parameters: * Traffic (decimal) valid values [0.0, 1.0] -* Traffic (decimal, string, string) session stickyness +* Traffic (decimal, string, string) session stickiness Examples: @@ -682,7 +682,7 @@ v1: "https://api-test-blue"; ``` -stickyness: +stickiness: ``` // hit by 5% percent chance diff --git a/docs/tutorials/auth.md b/docs/tutorials/auth.md index ae50c6ec68..91f7294579 100644 --- a/docs/tutorials/auth.md +++ b/docs/tutorials/auth.md @@ -182,12 +182,12 @@ oauthOidcUserInfo("https://oidc-provider.example.com", "client_id", "client_secr ``` This filter is similar but it verifies that the token has certain user information -information fields accesible with the token return by the provider. The fields can +information fields accessible with the token return by the provider. The fields can be specified at the end like in the example above where the fields `name`, `email` and `picture` are requested. -Upon sucessful authentication Skipper will start allowing the user requests through -to the backend. Along with the orginal request to the backend Skipper will include +Upon successful authentication Skipper will start allowing the user requests through +to the backend. Along with the original request to the backend Skipper will include information which it obtained from the provider. The information is in `JSON` format with the header name `Skipper-Oidc-Info`. In the case of the claims container the header value is in the format. @@ -310,7 +310,7 @@ Skipper must be configured with the following credentials and secrets: 1. OAuth2 client secret for authenticating with the OAuth2 provider. 1. Cookie encryption secret for encrypting and decrypting token cookies. -You can load all of theses secrets from separate files, in which case they get automatically +You can load all of these secrets from separate files, in which case they get automatically reloaded to support secret rotation. You can provide the paths to the files containing each secret as follows: diff --git a/docs/tutorials/basics.md b/docs/tutorials/basics.md index 3acd216e57..fc925ef07d 100644 --- a/docs/tutorials/basics.md +++ b/docs/tutorials/basics.md @@ -410,7 +410,7 @@ If there is more than 1024 routes used, then the paging the results is possible with the `offset` and `limit` query parameters: ``` -curl locahost:9911/routes?offset=2048&limit=512 +curl localhost:9911/routes?offset=2048&limit=512 ``` ### Route IDs diff --git a/docs/tutorials/development.md b/docs/tutorials/development.md index bbb85c09f3..59019e4811 100644 --- a/docs/tutorials/development.md +++ b/docs/tutorials/development.md @@ -67,7 +67,7 @@ For *Visual Studion Code* users, a simple setup could be to create following *la "-inline-routes=PathSubtree(\"/\") -> inlineContent(\"Hello World\") -> ", // example OIDC setup, using https://developer.microsoft.com/en-us/microsoft-365/dev-program // "-oidc-secrets-file=${workspaceFolder}/.vscode/launch.json", - // "-inline-routes=* -> oauthOidcAnyClaims(\"https://login.microsoftonline.com//v2.0\",\"\",\"\",\"http://localhost:9999/authcallback\", \"profile\", \"\", \"\", \"x-auth-email:claims.email x-groups:claims.groups\") -> inlineContent(\"restriced access\") -> ", + // "-inline-routes=* -> oauthOidcAnyClaims(\"https://login.microsoftonline.com//v2.0\",\"\",\"\",\"http://localhost:9999/authcallback\", \"profile\", \"\", \"\", \"x-auth-email:claims.email x-groups:claims.groups\") -> inlineContent(\"restricted access\") -> ", ], "serverReadyAction": { "pattern": "route settings applied", diff --git a/eskip/lexer.go b/eskip/lexer.go index 25f8fff1f7..99be400420 100644 --- a/eskip/lexer.go +++ b/eskip/lexer.go @@ -191,7 +191,7 @@ func scanRegexp(code string) ([]byte, string) { } if escaped { - //delimeter / is escaped in PathRegexp so that it means no end PathRegexp(/\//) + //delimiter / is escaped in PathRegexp so that it means no end PathRegexp(/\//) if !isDelimiter && !isEscapeChar { b = append(b, escapeChar) } diff --git a/eskipfile/remote.go b/eskipfile/remote.go index 02de85bfa3..2856600cef 100644 --- a/eskipfile/remote.go +++ b/eskipfile/remote.go @@ -17,7 +17,7 @@ import ( log "github.com/sirupsen/logrus" ) -var errContentNotChanged = errors.New("content in cache did not change, 304 reponse status code") +var errContentNotChanged = errors.New("content in cache did not change, 304 response status code") type remoteEskipFile struct { once sync.Once diff --git a/filters/apiusagemonitoring/spec_test.go b/filters/apiusagemonitoring/spec_test.go index 87d583f6c7..9356ca84b2 100644 --- a/filters/apiusagemonitoring/spec_test.go +++ b/filters/apiusagemonitoring/spec_test.go @@ -572,7 +572,7 @@ func Test_CreatePathPattern(t *testing.T) { originalPath: "//bas//customers///:customer-id//", expectedPathPattern: "^/*bas/+customers/+.+/*$", }, - "with escape caracters": { + "with escape characters": { originalPath: "/bas/*(cust\\omers)?.id+/", expectedPathPattern: "^/*bas/+\\*\\(cust\\\\omers\\)\\?\\.id\\+/*$", }, diff --git a/filters/auth/doc.go b/filters/auth/doc.go index 9692ffcc70..2bbc1b0b2f 100644 --- a/filters/auth/doc.go +++ b/filters/auth/doc.go @@ -353,7 +353,7 @@ filter after the auth filter. The filter webhook allows you to have a custom authentication and authorization endpoint for a route. Headers from the webhook response -can be copyied into the continuing request by specifying the +can be copied into the continuing request by specifying the headers to copy as an optional second argument to the filter a: Path("/only-allowed-by-webhook") -> webhook("https://custom-webhook.example.org/auth") -> "https://protected-backend.example.org/"; diff --git a/filters/auth/forwardtokenfield_test.go b/filters/auth/forwardtokenfield_test.go index f4cd74e5d9..fc532abc77 100644 --- a/filters/auth/forwardtokenfield_test.go +++ b/filters/auth/forwardtokenfield_test.go @@ -104,6 +104,6 @@ func TestForwardFieldFieldEmpty(t *testing.T) { f.Request(c) if c.FRequest.Header.Get("Header1") != "blbabla" { - t.Fatalf("Header1 should not be overriden") + t.Fatalf("Header1 should not be overridden") } } diff --git a/filters/fadein/fadein.go b/filters/fadein/fadein.go index af673f15a8..014397d237 100644 --- a/filters/fadein/fadein.go +++ b/filters/fadein/fadein.go @@ -174,7 +174,7 @@ func (endpointCreated) CreateFilter(args []interface{}) (filters.Filter, error) return nil, filters.ErrInvalidFilterParameters } - // mitigate potential flakyness caused by clock skew. When the created time is in the future based on + // mitigate potential flakiness caused by clock skew. When the created time is in the future based on // the local clock, we ignore it. now := time.Now() if ec.when.After(now) { diff --git a/filters/flowid/filter.go b/filters/flowid/filter.go index 4d6886cd0d..2575cf5622 100644 --- a/filters/flowid/filter.go +++ b/filters/flowid/filter.go @@ -99,7 +99,7 @@ func (spec *flowIdSpec) CreateFilter(fc []interface{}) (filters.Filter, error) { return nil, filters.ErrInvalidFilterParameters } if len(fc) > 1 { - log.Println("flow id filter warning: this syntaxt is deprecated and will be removed soon. " + + log.Println("flow id filter warning: this syntax is deprecated and will be removed soon. " + "please check updated docs") } } diff --git a/filters/ratelimit/ratelimit.go b/filters/ratelimit/ratelimit.go index 995ee8c9e9..e6a2662db4 100644 --- a/filters/ratelimit/ratelimit.go +++ b/filters/ratelimit/ratelimit.go @@ -1,5 +1,5 @@ /* -Package ratelimit provides filters to control the rate limitter settings on the route level. +Package ratelimit provides filters to control the rate limiter settings on the route level. For detailed documentation of the ratelimit, see https://godoc.org/github.com/zalando/skipper/ratelimit. */ diff --git a/filters/scheduler/fifo_test.go b/filters/scheduler/fifo_test.go index ba6c3a175a..56a2ca530f 100644 --- a/filters/scheduler/fifo_test.go +++ b/filters/scheduler/fifo_test.go @@ -207,7 +207,7 @@ func TestFifo(t *testing.T) { t.Fatalf("Failed to parse filter: %v", err) } if err == nil && tt.wantParseErr { - t.Fatalf("want parse error but hav no: %v", err) + t.Fatalf("want parse error but have no: %v", err) } if tt.wantParseErr { return @@ -375,7 +375,7 @@ func TestConstantRouteUpdatesFifo(t *testing.T) { t.Fatalf("Failed to parse filter: %v", err) } if err == nil && tt.wantParseErr { - t.Fatalf("want parse error but hav no: %v", err) + t.Fatalf("want parse error but have no: %v", err) } if tt.wantParseErr { return diff --git a/filters/scheduler/lifo.go b/filters/scheduler/lifo.go index 2b9491fa07..60db279a58 100644 --- a/filters/scheduler/lifo.go +++ b/filters/scheduler/lifo.go @@ -85,7 +85,7 @@ func (s *lifoSpec) Name() string { return filters.LifoName } // MaxConcurrency and MaxQueueSize: total max = MaxConcurrency + MaxQueueSize // // Min values are 1 for MaxConcurrency and MaxQueueSize, and 1ms for -// Timeout. All configration that is below will be set to these min +// Timeout. All configuration that is below will be set to these min // values. func (s *lifoSpec) CreateFilter(args []interface{}) (filters.Filter, error) { var l lifoFilter @@ -153,7 +153,7 @@ func (*lifoGroupSpec) Name() string { return filters.LifoGroupName } // MaxConcurrency and MaxQueueSize: total max = MaxConcurrency + MaxQueueSize // // Min values are 1 for MaxConcurrency and MaxQueueSize, and 1ms for -// Timeout. All configration that is below will be set to these min +// Timeout. All configuration that is below will be set to these min // values. // // It is enough to set the concurrency, queue size and timeout parameters for diff --git a/filters/scheduler/lifo_test.go b/filters/scheduler/lifo_test.go index 1d61e89d2b..ac30921066 100644 --- a/filters/scheduler/lifo_test.go +++ b/filters/scheduler/lifo_test.go @@ -337,7 +337,7 @@ func TestNewLIFO(t *testing.T) { t.Errorf("Queue should not be nil, got: %v", q) } } else { - t.Fatalf("Failed to get lifoFilter ot lifoGroupFilter from filter: %v, ok: %v", f, ok) + t.Fatalf("Failed to get lifoFilter or lifoGroupFilter from filter: %v, ok: %v", f, ok) } backend := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { diff --git a/filters/sed/doc.go b/filters/sed/doc.go index 7d20ca135b..4081f6f5c8 100644 --- a/filters/sed/doc.go +++ b/filters/sed/doc.go @@ -12,7 +12,7 @@ Example with larger max buffer: editorRoute: * -> sed("foo", "bar", 64000000) -> "https://www.example.org"; This filter expects a regexp pattern and a replacement string as arguments. -During the streaming of the response body, every occurence of the pattern will +During the streaming of the response body, every occurrence of the pattern will be replaced with the replacement string. The editing doesn't happen right when the filter is executed, only later when the streaming normally happens, after all response filters were called. diff --git a/filters/sed/editor.go b/filters/sed/editor.go index bd5c525216..e37a34b089 100644 --- a/filters/sed/editor.go +++ b/filters/sed/editor.go @@ -19,13 +19,13 @@ const ( maxBufferAbort ) -// editor provides a reader that wraps an input reader, and replaces each occurence of +// editor provides a reader that wraps an input reader, and replaces each occurrence of // the provided search pattern with the provided replacement. It can be used with a // delimiter or without. // // When using it with a delimiter, it reads enough data from the input until meeting // a delimiter or reaching maxBufferSize. The chunk includes the delimiter if any. Then -// every occurence of the pattern is replaced, and the entire edited chunk is returned +// every occurrence of the pattern is replaced, and the entire edited chunk is returned // to the caller. // // When not using a delimiter, it reads enough data until at least a complete match of the diff --git a/loadbalancer/fadein_test.go b/loadbalancer/fadein_test.go index bb7a32b33c..fca793885e 100644 --- a/loadbalancer/fadein_test.go +++ b/loadbalancer/fadein_test.go @@ -146,7 +146,7 @@ func testFadeIn( } // Print CSV-like output for, where row number represents time and - // column represents endpoint. You can vizualize it using + // column represents endpoint. You can visualize it using // ./skptesting/run_fadein_test.sh from the skipper repo root. t.Log("CSV " + fmt.Sprintf("%d,", i) + strings.Join(showStats, ",")) } diff --git a/metrics/metrics.go b/metrics/metrics.go index 6e2286b476..cb6404f408 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -120,12 +120,12 @@ type Options struct { // If set, the detailed total response time metrics will contain the // HTTP method as a domain of the metric. It affects both route and - // host splitted metrics. + // host split metrics. EnableServeMethodMetric bool // If set, the detailed total response time metrics will contain the // HTTP Response status code as a domain of the metric. It affects - // both route and host splitted metrics. + // both route and host split metrics. EnableServeStatusCodeMetric bool // If set, detailed response time metrics will be collected diff --git a/metrics/metrics_test.go b/metrics/metrics_test.go index 1792495cc9..8ef232c68f 100644 --- a/metrics/metrics_test.go +++ b/metrics/metrics_test.go @@ -119,7 +119,7 @@ func TestHandlerCodaHaleSingleMetricsRequest(t *testing.T) { } if len(data) != 1 { - t.Error("Metrics endpoint for exact match should've returned exactly te requested item") + t.Error("Metrics endpoint for exact match should've returned exactly the requested item") } if _, ok := data["counters"]["TestHandlerCodaHaleSingleMetricsRequest"]; !ok { @@ -150,7 +150,7 @@ func TestHandlerCodaHaleSingleMetricsRequestWhenUsingPrefix(t *testing.T) { } if len(data) != 1 { - t.Error("Metrics endpoint for exact match using prefix should've returned exactly te requested item") + t.Error("Metrics endpoint for exact match using prefix should've returned exactly the requested item") } if _, ok := data["counters"]["zmon.TestHandlerCodaHaleSingleMetricsRequestWhenUsingPrefix"]; !ok { diff --git a/metrics/prometheus_test.go b/metrics/prometheus_test.go index a8c7c0dcd4..6e5640c22d 100644 --- a/metrics/prometheus_test.go +++ b/metrics/prometheus_test.go @@ -514,7 +514,7 @@ func TestPrometheusMetrics(t *testing.T) { expCode: http.StatusOK, }, { - name: "Measuring all serves by the hosts splitted by route, only should measure served latency by route.", + name: "Measuring all serves by the hosts split by route, only should measure served latency by route.", opts: metrics.Options{ EnableServeRouteMetrics: true, EnableServeRouteCounter: true, @@ -560,7 +560,7 @@ func TestPrometheusMetrics(t *testing.T) { expCode: http.StatusOK, }, { - name: "Measuring all serves by the hosts splitted by route, only should measure served latency by route without method.", + name: "Measuring all serves by the hosts split by route, only should measure served latency by route without method.", opts: metrics.Options{ EnableServeRouteMetrics: true, EnableServeRouteCounter: true, @@ -608,7 +608,7 @@ func TestPrometheusMetrics(t *testing.T) { expCode: http.StatusOK, }, { - name: "Measuring all serves by the hosts splitted by route, only should measure served latency by route without code.", + name: "Measuring all serves by the hosts split by route, only should measure served latency by route without code.", opts: metrics.Options{ EnableServeRouteMetrics: true, EnableServeRouteCounter: true, @@ -656,7 +656,7 @@ func TestPrometheusMetrics(t *testing.T) { expCode: http.StatusOK, }, { - name: "Measuring all serves by the hosts splitted by route, only should measure served latency by route without method and code.", + name: "Measuring all serves by the hosts split by route, only should measure served latency by route without method and code.", opts: metrics.Options{ EnableServeRouteMetrics: true, EnableServeRouteCounter: true, @@ -704,7 +704,7 @@ func TestPrometheusMetrics(t *testing.T) { expCode: http.StatusOK, }, { - name: "Measuring all serves by the hosts splitted by route, should measure served latency by host.", + name: "Measuring all serves by the hosts split by route, should measure served latency by host.", opts: metrics.Options{ EnableServeRouteMetrics: false, EnableServeRouteCounter: false, @@ -750,7 +750,7 @@ func TestPrometheusMetrics(t *testing.T) { expCode: http.StatusOK, }, { - name: "Measuring all serves by the hosts splitted by hosts, only should measure served latency by route without method.", + name: "Measuring all serves by the hosts split by hosts, only should measure served latency by route without method.", opts: metrics.Options{ EnableServeRouteMetrics: false, EnableServeRouteCounter: false, @@ -798,7 +798,7 @@ func TestPrometheusMetrics(t *testing.T) { expCode: http.StatusOK, }, { - name: "Measuring all serves by the hosts splitted by hosts, only should measure served latency by route without code.", + name: "Measuring all serves by the hosts split by hosts, only should measure served latency by route without code.", opts: metrics.Options{ EnableServeRouteMetrics: false, EnableServeRouteCounter: false, @@ -846,7 +846,7 @@ func TestPrometheusMetrics(t *testing.T) { expCode: http.StatusOK, }, { - name: "Measuring all serves by the hosts splitted by hosts, only should measure served latency by route without method and code.", + name: "Measuring all serves by the hosts split by hosts, only should measure served latency by route without method and code.", opts: metrics.Options{ EnableServeRouteMetrics: false, EnableServeRouteCounter: false, diff --git a/mkdocs.yml b/mkdocs.yml index 8238c4b06b..ae79c3a423 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -33,7 +33,7 @@ nav: - Tutorials: - Basics: tutorials/basics.md - Common Use Cases: tutorials/common-use-cases.md - - Authentication and Autorization: tutorials/auth.md + - Authentication and Authorization: tutorials/auth.md - Ratelimits: tutorials/ratelimit.md - Shadow Traffic: tutorials/shadow-traffic.md - Operations: tutorials/operations.md diff --git a/predicates/query/query_test.go b/predicates/query/query_test.go index 0cc77974f4..43e49dba65 100644 --- a/predicates/query/query_test.go +++ b/predicates/query/query_test.go @@ -105,7 +105,7 @@ func TestMatchArgs(t *testing.T) { []string{"value"}, false, }, { - "find existin params with multiple values", + "find existing params with multiple values", []interface{}{"key"}, "key", []string{"value1", "value2"}, @@ -140,7 +140,7 @@ func TestMatchArgs(t *testing.T) { t.Error(ti.msg, "failed to create predicate") } - req, _ := http.NewRequest("GET", "http://examlpe.com", nil) + req, _ := http.NewRequest("GET", "http://example.com", nil) q := req.URL.Query() for _, v := range ti.values { diff --git a/predicates/source/source.go b/predicates/source/source.go index 5d0d0ef645..580dc86dcd 100644 --- a/predicates/source/source.go +++ b/predicates/source/source.go @@ -3,8 +3,8 @@ Package source implements a custom predicate to match routes based on the source IP of a request. It is similar in function and usage to the header predicate but -has explicit support for IP adresses and netmasks to conveniently -create routes based on a whole network of adresses, like a company +has explicit support for IP addresses and netmasks to conveniently +create routes based on a whole network of addresses, like a company network or something similar. It is important to note, that this predicate should not be used as diff --git a/predicates/traffic/traffic_test.go b/predicates/traffic/traffic_test.go index 4eed1c8006..6d68ca18b4 100644 --- a/predicates/traffic/traffic_test.go +++ b/predicates/traffic/traffic_test.go @@ -77,7 +77,7 @@ func TestCreate(t *testing.T) { predicate{chance: .3}, true, }, { - "chance and stickyness", + "chance and stickiness", []interface{}{.3, "testname", "group"}, predicate{chance: .3, trafficGroup: "group", trafficGroupCookie: "testname"}, false, diff --git a/proxy/fadein_test.go b/proxy/fadein_test.go index 151c0f0881..193f612932 100644 --- a/proxy/fadein_test.go +++ b/proxy/fadein_test.go @@ -81,7 +81,7 @@ single proxy, without sync single proxy, with sync no endpoitns, with/without fade-in, with/without created time - start single/mutliple -> no fade-in + start single/multiple -> no fade-in single endpoint with fade-in with/without created time diff --git a/proxy/fadeintesting_test.go b/proxy/fadeintesting_test.go index 4c3f6f7373..4d6465176b 100644 --- a/proxy/fadeintesting_test.go +++ b/proxy/fadeintesting_test.go @@ -308,7 +308,7 @@ func (p *fadeInProxy) close() { } } -// startClient starts a client continously polling the available proxy instances. +// startClient starts a client continuously polling the available proxy instances. // The distribution of the requests across the available backend endpoints and in // time is measured the by the client. func startClient(test *testing.T, p *fadeInProxy) *fadeInClient { diff --git a/proxy/idle_test.go b/proxy/idle_test.go index 8bb8950ead..a0595eca21 100644 --- a/proxy/idle_test.go +++ b/proxy/idle_test.go @@ -29,7 +29,7 @@ func hasArg(arg string) bool { // simple crash test only, use utilities in skptesting // for benchmarking. // -// This test is unpredicable, and occasionally fails on certain OSes. +// This test is unpredictable, and occasionally fails on certain OSes. // To run this test, set `-args idle` for the test command. func TestIdleConns(t *testing.T) { r := rand.New(rand.NewSource(time.Now().UnixNano())) diff --git a/ratelimit/ratelimit.go b/ratelimit/ratelimit.go index d9e4ca89a0..51bac749fc 100644 --- a/ratelimit/ratelimit.go +++ b/ratelimit/ratelimit.go @@ -336,7 +336,7 @@ func (s Settings) String() string { } } -// limiter defines the requirement to be used as a ratelimit implmentation. +// limiter defines the requirement to be used as a ratelimit implementation. type limiter interface { // Allow is used to get a decision if you should allow the // call with context, to pass or to ratelimit @@ -363,7 +363,7 @@ type limiter interface { } // Ratelimit is a proxy object that delegates to limiter -// implemetations and stores settings for the ratelimiter +// implementations and stores settings for the ratelimiter type Ratelimit struct { settings Settings impl limiter diff --git a/ratelimit/ratelimit_test.go b/ratelimit/ratelimit_test.go index fc79049cdc..a48e5df79d 100644 --- a/ratelimit/ratelimit_test.go +++ b/ratelimit/ratelimit_test.go @@ -13,13 +13,13 @@ import ( func checkRatelimitted(t *testing.T, rl *Ratelimit, client string) { if rl.Allow(context.Background(), client) { - t.Errorf("request is allowed for %s, but expected to be rate limitted", client) + t.Errorf("request is allowed for %s, but expected to be rate limited", client) } } func checkNotRatelimitted(t *testing.T, rl *Ratelimit, client string) { if !rl.Allow(context.Background(), client) { - t.Errorf("request is rate limitted for %s, but expected to be allowed", client) + t.Errorf("request is rate limited for %s, but expected to be allowed", client) } } diff --git a/routesrv/options.go b/routesrv/options.go index 9f9f558b01..c73342186a 100644 --- a/routesrv/options.go +++ b/routesrv/options.go @@ -90,7 +90,7 @@ type Options struct { KubernetesEastWestRangePredicates []*eskip.Predicate // KubernetesOnlyAllowedExternalNames will enable validation of ingress external names and route groups network - // backend addresses, explicit LB endpoints validation agains the list of patterns in + // backend addresses, explicit LB endpoints validation against the list of patterns in // AllowedExternalNames. KubernetesOnlyAllowedExternalNames bool diff --git a/routing/matcher_test.go b/routing/matcher_test.go index eaeb9d687a..13c0487fc3 100644 --- a/routing/matcher_test.go +++ b/routing/matcher_test.go @@ -88,7 +88,7 @@ var ( testMatcher3 *matcher testMatcher4 *matcher - // flag inidicating if the test routes and matcher were already initialized + // flag indicating if the test routes and matcher were already initialized benchmarkMatchersInitialzed bool // a matcher with a generic set of routes diff --git a/secrets/certregistry/certregistry.go b/secrets/certregistry/certregistry.go index 945735bafe..c10b95fdec 100644 --- a/secrets/certregistry/certregistry.go +++ b/secrets/certregistry/certregistry.go @@ -10,7 +10,7 @@ import ( ) // CertRegistry object holds TLS certificates to be used to terminate TLS connections -// ensuring syncronized access to them. +// ensuring synchronized access to them. type CertRegistry struct { lookup map[string]*tls.Certificate mx *sync.Mutex diff --git a/secrets/encrypter_test.go b/secrets/encrypter_test.go index cc1e66ba0b..cf2573924a 100644 --- a/secrets/encrypter_test.go +++ b/secrets/encrypter_test.go @@ -215,7 +215,7 @@ func TestGetEncrypter(t *testing.T) { t.Errorf("Failed to create nonce: %v", err) } if len(nonce) == 0 { - t.Error("Failed to create vaild nonce") + t.Error("Failed to create valid nonce") } clearText := "hello" diff --git a/skipper.go b/skipper.go index e751e3abbd..070d599794 100644 --- a/skipper.go +++ b/skipper.go @@ -255,7 +255,7 @@ type Options struct { KubernetesEastWestRangePredicates []*eskip.Predicate // KubernetesOnlyAllowedExternalNames will enable validation of ingress external names and route groups network - // backend addresses, explicit LB endpoints validation agains the list of patterns in + // backend addresses, explicit LB endpoints validation against the list of patterns in // AllowedExternalNames. KubernetesOnlyAllowedExternalNames bool @@ -471,12 +471,12 @@ type Options struct { // If set, the detailed total response time metrics will contain the // HTTP method as a domain of the metric. It affects both route and - // host splitted metrics. + // host split metrics. EnableServeMethodMetric bool // If set, the detailed total response time metrics will contain the // HTTP Response status code as a domain of the metric. It affects - // both route and host splitted metrics. + // both route and host split metrics. EnableServeStatusCodeMetric bool // If set, detailed response time metrics will be collected @@ -582,7 +582,7 @@ type Options struct { DebugListener string - // Path of certificate(s) when using TLS, mutiple may be given comma separated + // Path of certificate(s) when using TLS, multiple may be given comma separated CertPathTLS string // Path of key(s) when using TLS, multiple may be given comma separated. For // multiple keys, the order must match the one given in CertPathTLS diff --git a/swarm/swarm.go b/swarm/swarm.go index 9aa3ac79fb..6e4b98e33c 100644 --- a/swarm/swarm.go +++ b/swarm/swarm.go @@ -31,7 +31,7 @@ func (st swarmType) String() string { case swarmFake: return "fake Swarm" } - return "unkwown Swarm" + return "unknown Swarm" } func getSwarmType(o Options) swarmType { @@ -197,7 +197,7 @@ func Start(o Options) (*Swarm, error) { return Join(o, knownEntryPoint.Node(), knownEntryPoint.Nodes(), cleanupF) } -// Join will join given Swarm peers and return an initialiazed Swarm +// Join will join given Swarm peers and return an initialized Swarm // object if successful. func Join(o Options, self *NodeInfo, nodes []*NodeInfo, cleanupF func()) (*Swarm, error) { if self == nil {