(ctx context.Context, d time.Duration)
| 206 | } |
| 207 | |
| 208 | func sleepContext(ctx context.Context, d time.Duration) error { |
| 209 | timer := time.NewTimer(d) |
| 210 | defer timer.Stop() |
| 211 | |
| 212 | select { |
| 213 | case <-ctx.Done(): |
| 214 | return ctx.Err() |
| 215 | case <-timer.C: |
| 216 | return nil |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | // ParseFreeAssets extracts the Limited-Time Free section from a rendered HTML document. |
| 221 | func ParseFreeAssets(document string) (Result, error) { |
no outgoing calls
no test coverage detected