jsend

package
v0.14.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(mode *goflagsmode.Flag, logger *slog.Logger) (
	*gonethttphandlerjson.Handler,
	error,
)

NewHandler creates a new JSON handler in JSend format

Parameters:

  • mode: the flag mode
  • logger: the logger instance

Returns:

  • *Handler: the created JSON handler
  • error: the error if any

func NewStreamHandler

func NewStreamHandler(mode *goflagsmode.Flag, logger *slog.Logger) (
	*gonethttphandlerjson.StreamHandler,
	error,
)

NewStreamHandler creates a new JSON handler in JSend format

Parameters:

  • mode: the flag mode
  • logger: the logger for the handler

Returns:

  • *StreamHandler: the created JSON handler
  • error: the error if any

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL