to

package
v0.0.0-...-7e4e87f Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

package to contains functions for converting between types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSON

func JSON(rw http.ResponseWriter, obj any, writerOpts ...func(w io.Writer) io.Writer) error

JSON writes the given object to the response body as JSON. If obj is a nil slice, an empty JSON array is written. If obj is a nil map, an empty JSON object is written. If obj is a nil pointer, a null is written.

Types

This section is empty.

Jump to

Keyboard shortcuts

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