@@ -11,13 +11,13 @@ import (
1111 "gotest.tools/v3/internal/assert"
1212)
1313
14- // TestingT is the subset of testing.T used by WaitOn
14+ // TestingT is the subset of [ testing.T] used by [ WaitOn]
1515type TestingT interface {
1616 LogT
1717 Fatalf (format string , args ... interface {})
1818}
1919
20- // LogT is a logging interface that is passed to the WaitOn check function
20+ // LogT is a logging interface that is passed to the [ WaitOn] check function
2121type LogT interface {
2222 Log (args ... interface {})
2323 Logf (format string , args ... interface {})
@@ -27,7 +27,7 @@ type helperT interface {
2727 Helper ()
2828}
2929
30- // Settings are used to configure the behaviour of WaitOn
30+ // Settings are used to configure the behaviour of [ WaitOn]
3131type Settings struct {
3232 // Timeout is the maximum time to wait for the condition. Defaults to 10s.
3333 Timeout time.Duration
@@ -57,7 +57,7 @@ func WithTimeout(timeout time.Duration) SettingOp {
5757 }
5858}
5959
60- // Result of a check performed by WaitOn
60+ // Result of a check performed by [ WaitOn]
6161type Result interface {
6262 // Error indicates that the check failed and polling should stop, and the
6363 // the has failed
@@ -86,20 +86,20 @@ func (r result) Error() error {
8686 return r .err
8787}
8888
89- // Continue returns a Result that indicates to WaitOn that it should continue
89+ // Continue returns a [ Result] that indicates to [ WaitOn] that it should continue
9090// polling. The message text will be used as the failure message if the timeout
9191// is reached.
9292func Continue (message string , args ... interface {}) Result {
9393 return result {message : fmt .Sprintf (message , args ... )}
9494}
9595
96- // Success returns a Result where Done() returns true, which indicates to WaitOn
96+ // Success returns a [ Result] where Done() returns true, which indicates to [ WaitOn]
9797// that it should stop polling and exit without an error.
9898func Success () Result {
9999 return result {done : true }
100100}
101101
102- // Error returns a Result that indicates to WaitOn that it should fail the test
102+ // Error returns a [ Result] that indicates to [ WaitOn] that it should fail the test
103103// and stop polling.
104104func Error (err error ) Result {
105105 return result {err : err }
@@ -143,9 +143,9 @@ func WaitOn(t TestingT, check Check, pollOps ...SettingOp) {
143143 }
144144}
145145
146- // Compare values using the cmp.Comparison. If the comparison fails return a
146+ // Compare values using the [ cmp.Comparison] . If the comparison fails return a
147147// result which indicates to WaitOn that it should continue waiting.
148- // If the comparison is successful then WaitOn stops polling.
148+ // If the comparison is successful then [ WaitOn] stops polling.
149149func Compare (compare cmp.Comparison ) Result {
150150 buf := new (logBuffer )
151151 if assert .RunComparison (buf , assert .ArgsAtZeroIndex , compare ) {
0 commit comments