Skip to content

not detected #364

@comerc

Description

@comerc
package main

import (
	"bytes"
	"io"
)

func fn(out io.Writer) {
	if out != nil {
		out.Write([]byte("OK\n"))
	}
}

func main() {
	// case 1: detected
	var a *int
	b := *a // panic
	println(b)

	// case 2: not detected
	var buf *bytes.Buffer = nil
	fn(buf) // panic
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions