Skip to content

cmd/gofmt: go fmt eats my source code if it gets ENOSPC #8984

@gopherbot

Description

@gopherbot

by [email protected]:

What does 'go version' print?

go version go1.2.1 linux/amd64

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

1. write some code
2. fill up your disk
3. run `go fmt`

What happened?

go fmt deletes my code, then tells me ENOSPC. go fmt should ideally be smart enough to
realize that (preferably by keeping the old file around until the write of the new file
succeeds) and not delete my source code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions