Skip to content

Commit 4065930

Browse files
mdelapenyaclaude
andcommitted
docs(wait): add Go doc comments to all String() methods
Add standard Go documentation comments to all String() method implementations across wait strategies for better code documentation and godoc generation. Changes: - Add "String returns a human-readable description of the wait strategy" comment to all String() methods in: - ExecStrategy - HealthStrategy - LogStrategy - HostPortStrategy - FileStrategy - ExitStrategy - NopStrategy - waitForSQL - TLSStrategy - MultiStrategy 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e3f2903 commit 4065930

File tree

10 files changed

+10
-0
lines changed

10 files changed

+10
-0
lines changed

wait/all.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ func (ms *MultiStrategy) Timeout() *time.Duration {
5353
return ms.timeout
5454
}
5555

56+
// String returns a human-readable description of the wait strategy.
5657
func (ms *MultiStrategy) String() string {
5758
if len(ms.Strategies) == 0 {
5859
return "all of: (none)"

wait/exec.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ func (ws *ExecStrategy) Timeout() *time.Duration {
7777
return ws.timeout
7878
}
7979

80+
// String returns a human-readable description of the wait strategy.
8081
func (ws *ExecStrategy) String() string {
8182
if len(ws.cmd) == 0 {
8283
return "exec command"

wait/exit.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ func (ws *ExitStrategy) Timeout() *time.Duration {
5959
return ws.timeout
6060
}
6161

62+
// String returns a human-readable description of the wait strategy.
6263
func (ws *ExitStrategy) String() string {
6364
return "container to exit"
6465
}

wait/file.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ func (ws *FileStrategy) Timeout() *time.Duration {
6161
return ws.timeout
6262
}
6363

64+
// String returns a human-readable description of the wait strategy.
6465
func (ws *FileStrategy) String() string {
6566
if ws.matcher != nil {
6667
return fmt.Sprintf("file %q to exist and match condition", ws.file)

wait/health.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ func (ws *HealthStrategy) Timeout() *time.Duration {
6060
return ws.timeout
6161
}
6262

63+
// String returns a human-readable description of the wait strategy.
6364
func (ws *HealthStrategy) String() string {
6465
return "container to become healthy"
6566
}

wait/host_port.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ func (hp *HostPortStrategy) Timeout() *time.Duration {
114114
return hp.timeout
115115
}
116116

117+
// String returns a human-readable description of the wait strategy.
117118
func (hp *HostPortStrategy) String() string {
118119
port := "first exposed port"
119120
if hp.Port != "" {

wait/log.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ func (ws *LogStrategy) Timeout() *time.Duration {
123123
return ws.timeout
124124
}
125125

126+
// String returns a human-readable description of the wait strategy.
126127
func (ws *LogStrategy) String() string {
127128
logType := "log message"
128129
if ws.IsRegexp {

wait/nop.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ func (ws *NopStrategy) Timeout() *time.Duration {
3333
return ws.timeout
3434
}
3535

36+
// String returns a human-readable description of the wait strategy.
3637
func (ws *NopStrategy) String() string {
3738
return "custom wait condition"
3839
}

wait/sql.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ func (w *waitForSQL) Timeout() *time.Duration {
6161
return w.timeout
6262
}
6363

64+
// String returns a human-readable description of the wait strategy.
6465
func (w *waitForSQL) String() string {
6566
port := "default"
6667
if w.Port != "" {

wait/tls.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ func (ws *TLSStrategy) TLSConfig() *tls.Config {
100100
return ws.tlsConfig
101101
}
102102

103+
// String returns a human-readable description of the wait strategy.
103104
func (ws *TLSStrategy) String() string {
104105
var parts []string
105106

0 commit comments

Comments
 (0)