gomaf

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 3 Imported by: 0

README

gomaf

codecov

Output the difference of struct to map

Installation

go get github.com/KenjiHosaka/gomaf

How to use


oldVal := struct {
    Name string `gomaf:"name"`
    Age  int    `gomaf:"age"`
}{
    Name: "gomaf",
    Age:  20,
}

newVal := struct {
    Name string `gomaf:"name"`
    Age  int    `gomaf:"age"`
}{
    Name: "",
    Age:  20,
}

result, err := Diff(oldVal, newVal)
// result: {"name":""}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff(old, new any) (map[string]any, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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