From 7373214cdb3105a782349e8778140e4a92c7d367 Mon Sep 17 00:00:00 2001 From: Abirdcfly Date: Tue, 30 Aug 2022 16:26:36 +0800 Subject: [PATCH] chore: remove duplicate word in comments Signed-off-by: Abirdcfly --- docs/index.md | 4 ++-- types/code_location.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/index.md b/docs/index.md index 3a0d7f372..55be4ebfd 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1254,7 +1254,7 @@ DescribeTable("Extracting the author's first and last name", ) ``` -`DescribeTable` takes a string description, a **spec closure** to run for each table entry, and a set of entries. Each `Entry` takes a string description, followed by a list of parameters. `DescribeTable` will generate a spec for each `Entry` and when the specs run, the `Entry` parameters will be passed to the spec closure and must match the types expected by the the spec closure. +`DescribeTable` takes a string description, a **spec closure** to run for each table entry, and a set of entries. Each `Entry` takes a string description, followed by a list of parameters. `DescribeTable` will generate a spec for each `Entry` and when the specs run, the `Entry` parameters will be passed to the spec closure and must match the types expected by the spec closure. You'll be notified with a clear message at runtime if the parameter types don't match the spec closure signature. @@ -3474,7 +3474,7 @@ Rather than an exhaustive/detailed review we'll simply walk through some common Both `Eventually` and `Consistently` perform asynchronous assertions by polling the provided input. In the case of `Eventually`, Gomega polls the input repeatedly until the matcher is satisfied - once that happens the assertion exits successfully and execution continues. If the matcher is never satisfied `Eventually` will time out with a useful error message. Both the timeout and polling interval are [configurable](https://onsi.github.io/gomega/#eventually). -In the case of `Consistently`, Gomega polls the the input repeatedly and asserts the matcher is satisfied every time. `Consistently` only exits early if a failure occurs - otherwise it continues polling until the specified interval elapses. This is often the only way to assert that something "does not happen" in an asynchronous system. +In the case of `Consistently`, Gomega polls the input repeatedly and asserts the matcher is satisfied every time. `Consistently` only exits early if a failure occurs - otherwise it continues polling until the specified interval elapses. This is often the only way to assert that something "does not happen" in an asynchronous system. `Eventually` and `Consistently` can accept three types of input. You can pass in bare values and assert that some aspect of the value changes eventually. This is most commonly done with Go channels or Gomega's [`gbytes`](https://onsi.github.io/gomega/#gbytes-testing-streaming-buffers) and [`gexec`](https://onsi.github.io/gomega/#gexec-testing-external-processes) packages. You can also pass in functions and assert that their return values `Eventually` or `Consistently` satisfy a matcher - we'll cover those later. Lastly, you can pass in functions that take a `Gomega` argument - these allow you to make assertions within the function and are a way to assert that a series of assertions _eventually_ succeeds. We'll cover _that_ later as well. Let's look at these various input types through the lens of some concrete use-cases. diff --git a/types/code_location.go b/types/code_location.go index 00107d3ad..129109183 100644 --- a/types/code_location.go +++ b/types/code_location.go @@ -65,7 +65,7 @@ func NewCodeLocationWithStackTrace(skip int) CodeLocation { func PruneStack(fullStackTrace string, skip int) string { stack := strings.Split(fullStackTrace, "\n") // Ensure that the even entries are the method names and the - // the odd entries the source code information. + // odd entries the source code information. if len(stack) > 0 && strings.HasPrefix(stack[0], "goroutine ") { // Ignore "goroutine 29 [running]:" line. stack = stack[1:]