44b50937d5
When -v is passed, test-sources.sh passes it through to go test -v. sourcetest.Run uses testing.Verbose() to print the full manga list from GetPopularManga and GetLatestUpdates, showing title + URL.
32 lines
1.1 KiB
Go
32 lines
1.1 KiB
Go
// Package flare provides backward-compatible HTTP client helpers.
|
|
//
|
|
// All client logic now lives in the parent httpclient package.
|
|
// This package re-exports httpclient.Client for sources that already import
|
|
// "goyomi/internal/httpclient/flare" and is kept to avoid breaking existing code.
|
|
package flare
|
|
|
|
import "goyomi/internal/httpclient"
|
|
|
|
// Client is an alias for httpclient.Client.
|
|
//
|
|
// Sources that need the shared singleton should call httpclient.DefaultClient().
|
|
// Sources that need custom configuration (e.g., different rate limit) should
|
|
// call httpclient.NewClient() directly.
|
|
type Client = httpclient.Client
|
|
|
|
// NewClient creates a new httpclient.Client.
|
|
//
|
|
// Deprecated: prefer httpclient.DefaultClient() for the shared singleton or
|
|
// httpclient.NewClient(...) for sources with custom configuration.
|
|
func NewClient(opts ...httpclient.Option) *Client {
|
|
return httpclient.NewClient(opts...)
|
|
}
|
|
|
|
// Option aliases httpclient.Option.
|
|
type Option = httpclient.Option
|
|
|
|
// WithRateLimit aliases httpclient.WithRateLimit.
|
|
func WithRateLimit(rps float64, burst int) Option {
|
|
return httpclient.WithRateLimit(rps, burst)
|
|
}
|