Created
October 16, 2021 06:57
-
-
Save sagar290/f56256ba0002f1a73a5f6918d32e04d6 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
fields := reflect.VisibleFields(reflect.TypeOf(struct{ employeeDetails }{})) | |
for _, field := range fields { | |
fmt.Printf("Key: %s\tType: %s\n", field.Name, field.Type) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment