Help us shape the future of Go! Take the 2026 Go Developer Survey

mapping

package
v1.21.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package mapping copies between the entity, contract and DTO structs of the same data by field name, with the conversions the API needs: a time.Time becomes int64 Unix milliseconds, the form the JSON responses carry. It exists so that every copy applies the same policy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy added in v1.21.0

func Copy(dst, src any) error

Copy deep-copies the fields of src into dst, a pointer, by name; a time.Time source field fills an int64 destination with its Unix milliseconds, and zero source fields are copied too. A failure (mismatched types) leaves dst partly filled and is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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