blob: c321ec094c30bad57a94193ea93c8bb3ec9b4011 [file] [log] [blame]
// +build ignore
package main
import (
"fmt"
"golang.org/x/tools/imports"
)
func main() {
iface := "http.Handler"
src := "package hack; var i " + iface // HL
fmt.Println(src, "\n---")
imp, _ := imports.Process("", []byte(src), nil) // HL
// ignoring errors throughout this presentation
fmt.Println(string(imp))
}