エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
ここにツイート内容が記載されます https://b.hatena.ne.jp/URLはspanで囲んでください
Twitterで共有ONにすると、次回以降このダイアログを飛ばしてTwitterに遷移します
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
if a.xxx < b.xxx { return true } if a.xxx > b.xxx { return false } if a.yyy < b.yyy { return true... if a.xxx < b.xxx { return true } if a.xxx > b.xxx { return false } if a.yyy < b.yyy { return true } if a.yyy > b.yyy { return false } return a.zzz < b.zzz package main import ( "fmt" "sort" ) type person struct { firstName string lastName string age int } func main() { people := []person{ {"taro", "tanaka", 20}, {"hanako", "suzuki", 21}, {"taro", "sato", 22}, {"taro", "sato", 21}, } fmt.Println(pe