You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2025. It is now read-only.
package main
import (
"log"
)
// Implement interface
type Address struct {
City string
State string
Post string
*Person
}
// Implement interface
type Person struct {
Name string
Age int
*Address
}
func main() {
A := Address{
City: "New York",
State: "NY",
}
p := Person{
Name: "Alice",
Age: 30,
Address: &A,
}
A.Person = &p
}
Address include Person Point
Person include Address Point
json "github.com/json-iterator/go"
Use"encoding/json"