fix: convert literal nil to interface types

This commit is contained in:
Marc Vertes
2020-03-18 10:34:05 +01:00
committed by GitHub
parent ca68c6cd95
commit daaeac6e2c
3 changed files with 32 additions and 6 deletions

12
_test/interface27.go Normal file
View File

@@ -0,0 +1,12 @@
package main
import "fmt"
var errs = map[int]error{0: nil}
func main() {
fmt.Println(errs)
}
// Output:
// map[0:<nil>]