Skip to content

crypto/tls: superfluous "return" in generate_cert.go #53198

Description

@JeremyRand

What version of Go are you using (go version)?

Git 46ab7a5

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

linux/ppc64le, but that seems inapplicable to this issue.

What did you do?

Read the source for generate_cert.go, saw what looks like a superfluous return.

if err != nil {
log.Fatalf("Failed to open key.pem for writing: %v", err)
return
}

What did you expect to see?

	if err != nil {
		log.Fatalf("Failed to open key.pem for writing: %v", err)
	}

No return, since log.Fatalf makes it unnecessary, just like in the rest of the file.

What did you see instead?

	if err != nil {
		log.Fatalf("Failed to open key.pem for writing: %v", err)
		return
	}

The return seems unnecessary, and doesn't match the style in the rest of the file when log.Fatalf is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.TestingAn issue that has been verified to require only test changes, not just a test failure.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions