use cases consistently
This commit is contained in:
@@ -25,15 +25,15 @@ type TimesHandler struct {
|
||||
}
|
||||
|
||||
// NewTimesHandler creates a new TimesHandler with the provided options.
|
||||
func NewTimesHandler(http_client *http.Client, storage_url string, options ...HandlerOption) (*TimesHandler, error) {
|
||||
func NewTimesHandler(httpClient *http.Client, storageUrl string, options ...HandlerOption) (*TimesHandler, error) {
|
||||
baseHandler, err := NewHandler(options...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &TimesHandler{
|
||||
Handler: baseHandler,
|
||||
client: http_client,
|
||||
url: storage_url,
|
||||
client: httpClient,
|
||||
url: storageUrl,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ func runAPI(ctx *cli.Context) error {
|
||||
}
|
||||
|
||||
// Data service client
|
||||
storage_url := ctx.String("storage-host")
|
||||
storageUrl := ctx.String("storage-host")
|
||||
|
||||
return api.NewRouter(
|
||||
api.WithContext(ctx),
|
||||
@@ -65,6 +65,6 @@ func runAPI(ctx *cli.Context) error {
|
||||
api.WithDevClient(devConn),
|
||||
api.WithDataClient(dataConn),
|
||||
api.WithHttpClient(&http.Client{}),
|
||||
api.WithStorageUrl(storage_url),
|
||||
api.WithStorageUrl(storageUrl),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user