[Go] Int, String, Struct 정렬
·
Go
Input package sorts import ( "fmt" "sort" ) type person struct { name string age int loc *location } type location struct { nation string city string } func newPerson(name string, age int, nation, city string) *person { return &person{ name: name, age: age, loc: &location{ nation: nation, city: city, }, } } func SortStructMain() { // Integer 정렬 numbers := []int{1, 3, 4, 2, 5} slice := sort.IntSl..