mirror of
https://github.com/bakito/adguardhome-sync.git
synced 2024-11-14 11:57:32 +08:00
da289017a5
* generate model from openAPI schema * implement replica status #231 * Sync "Pause service blocking schedule" #234 * Sync "Safe Search Provider" #200
15 lines
291 B
Go
15 lines
291 B
Go
package utils
|
|
|
|
import "encoding/json"
|
|
|
|
func Clone[I interface{}](in I, out I) I {
|
|
b, _ := json.Marshal(in)
|
|
_ = json.Unmarshal(b, out)
|
|
return out
|
|
}
|
|
|
|
func JsonEquals(a interface{}, b interface{}) bool {
|
|
ja, _ := json.Marshal(a)
|
|
jb, _ := json.Marshal(b)
|
|
return string(ja) == string(jb)
|
|
}
|