File tree 1 file changed +1
-7
lines changed
1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ func (h *httpHandler) getOperationInfo(writer http.ResponseWriter, request *http
335
335
return
336
336
}
337
337
338
- bytes , err := h . options . Marshaler (info )
338
+ bytes , err := json . Marshal (info )
339
339
if err != nil {
340
340
h .writeFailure (writer , fmt .Errorf ("failed to marshal operation info: %w" , err ))
341
341
return
@@ -376,9 +376,6 @@ type HandlerOptions struct {
376
376
// A stuctured logger.
377
377
// Defaults to slog.Default().
378
378
Logger * slog.Logger
379
- // Optional marshaler for marshaling objects to JSON.
380
- // Defaults to json.Marshal.
381
- Marshaler func (any ) ([]byte , error )
382
379
// Max duration to allow waiting for a single get result request.
383
380
// Enforced if provided for requests with the wait query parameter set.
384
381
//
@@ -388,9 +385,6 @@ type HandlerOptions struct {
388
385
389
386
// NewHTTPHandler constructs an [http.Handler] from given options for handling Nexus service requests.
390
387
func NewHTTPHandler (options HandlerOptions ) http.Handler {
391
- if options .Marshaler == nil {
392
- options .Marshaler = json .Marshal
393
- }
394
388
if options .Logger == nil {
395
389
options .Logger = slog .Default ()
396
390
}
You can’t perform that action at this time.
0 commit comments