func GenImports(year int, pkg string, w io.Writer, imports ...string) {
	if year <= 0 {
		year = gopherYear
	}
	fmt.Fprintf(w, srcHeader, year, pkg)
	if len(imports) == 0 {
		return
	}

	fmt.Fprintf(w, "import (\n")
	for _, imp := range imports {
		if imp == "" {
			fmt.Fprintf(w, "\n")
			continue
		}
		fmt.Fprintf(w, "\t%q\n", imp)
	}
	fmt.Fprintf(w, ")\n\n")
}
// GenImports adds the provided imports to the given writer.
GenImports adds the provided imports to the given writer.
// GenImports adds the provided imports to the given writer .
func GenImports(year int, pkg string, w io.Writer, imports ...string) {
	if year <= 0 {
		year = gopherYear
	}
	fmt.Fprintf(w, srcHeader, year, pkg)
	if len(imports) == 0 {
		return
	}
	fmt.Fprintf(w, "import (\n")
	for _, imp := range imports {
		if imp == "" {
			fmt.Fprintf(w, "\n")
			continue
		}
		fmt.Fprintf(w, "\t%q\n", imp)
	}
	fmt.Fprintf(w, ")\n\n")
}
func GenImports ( year int , pkg string , w io . Writer , imports ... string ) { if year <= 0 { year = gopherYear } fmt . Fprintf ( w , srcHeader , year , pkg ) if len ( imports ) == 0 { return } fmt . Fprintf ( w , " \n " ) for _ , imp := range imports { if imp == " " { fmt . Fprintf ( w , " \n " ) continue } fmt . Fprintf ( w , " \t \n " , imp ) } fmt . Fprintf ( w , " \n \n " ) }
GenImports adds the provided imports to the given writer.
GenImports adds the provided imports to the given writer .