1
0
mirror of https://github.com/golang/go synced 2024-11-18 14:54:40 -07:00
go/cmd/goimports
Stephen Weinberg 55d5722095 imports, cmd/goimports: add missing package main if func main exists
Assuming:
        1) package declaration does not exist
        2) the Fragment option is set
        3) a main function exists

We will assume it is a main package and add the declaration.

This change also sets the Fragment option in goimports.

LGTM=crawshaw, bradfitz
R=bradfitz, crawshaw
CC=golang-codereviews
https://golang.org/cl/96850044
2014-04-28 17:15:33 -04:00
..
doc.go cmd/goimports: update doc, remove old gofmt flags 2014-02-12 08:35:02 -08:00
goimports.go imports, cmd/goimports: add missing package main if func main exists 2014-04-28 17:15:33 -04:00