Skip to content

KenjiHosaka/gomaf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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":""}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages