diff --git a/pkg/compiler/compiler.go b/pkg/compiler/compiler.go index 6875409fe..91fc072c6 100644 --- a/pkg/compiler/compiler.go +++ b/pkg/compiler/compiler.go @@ -3,10 +3,7 @@ package compiler import ( "bytes" "fmt" - "go/ast" - "go/build" "go/parser" - "go/types" "io" "io/ioutil" "os" @@ -61,11 +58,6 @@ func Compile(r io.Reader) ([]byte, error) { return buf, nil } -type archive struct { - f *ast.File - typeInfo *types.Info -} - // CompileAndSave will compile and save the file to disk. func CompileAndSave(src string, o *Options) ([]byte, error) { if !strings.HasSuffix(src, ".go") { @@ -90,11 +82,3 @@ func CompileAndSave(src string, o *Options) ([]byte, error) { out := fmt.Sprintf("%s.%s", o.Outfile, o.Ext) return b, ioutil.WriteFile(out, b, os.ModePerm) } - -func gopath() string { - gopath := os.Getenv("GOPATH") - if len(gopath) == 0 { - gopath = build.Default.GOPATH - } - return gopath -}