mirror of
https://github.com/teivah/100-go-mistakes.git
synced 2026-06-25 02:46:53 +08:00
Fix <2>
This commit is contained in:
parent
61fa4e35f6
commit
3c6f0455d9
1 changed files with 1 additions and 1 deletions
|
|
@ -66,7 +66,7 @@ Let’s get back to the `getKeys` function and use type parameters to write a ge
|
||||||
|
|
||||||
```go
|
```go
|
||||||
func getKeys[K comparable, V any](m map[K]V) []K {
|
func getKeys[K comparable, V any](m map[K]V) []K {
|
||||||
var keys []K <2>
|
var keys []K
|
||||||
for k := range m {
|
for k := range m {
|
||||||
keys = append(keys, k)
|
keys = append(keys, k)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue