2023-05-01から1ヶ月間の記事一覧

golang mapチートシート

パターン 定義 len Read Write nil map var nilMap map[string]int 0 できる panic empty map literal emptyMapLiteral := map[string]int{} 0 できる できる nonempty map literal teams := map[string][]string{"Orcas": {"Fred", "Ralph", "Bijou"},"Lion…