unexpected type: *reflect.ValueError: reflect: call of reflect.Value.Call on zero Value
visualfc opened this issue · comments
七叶 commented
package main
import (
"fmt"
"os"
)
type fileInfoMeta struct {
os.FileInfo
}
func isSymlink(fi os.FileInfo) bool {
return fi != nil && fi.Mode()&os.ModeSymlink == os.ModeSymlink
}
func main() {
fi, err := os.Stat("./main.go")
if err != nil {
panic(err)
}
fmi := &fileInfoMeta{fi}
fmt.Println(isSymlink(fmi))
}
igop run main.go
unexpected type: *reflect.ValueError: reflect: call of reflect.Value.Call on zero Value