Created
April 26, 2021 06:36
-
-
Save ayzu/37f6f157ca7c67f629b8463cdbea830b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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