Skip to content

Instantly share code, notes, and snippets.

@ayzu
Created April 26, 2021 06:36
Show Gist options
  • Save ayzu/37f6f157ca7c67f629b8463cdbea830b to your computer and use it in GitHub Desktop.
Save ayzu/37f6f157ca7c67f629b8463cdbea830b to your computer and use it in GitHub Desktop.
type Struct1 struct {
A int
B int
}
type Struct2 struct {
A int
}
func main() {
s1 := Struct1{}
s2 := Struct2(s1)
fmt.Printf("%#v", s2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment