package main

import (
	"fmt"
	"os"

	"golang.org/x/tools/go/loader"
)

func main() {
	var conf loader.Config

	//conf.CreateFromFilenames(".", os.Args[1:]...)
	conf.FromArgs(os.Args[1:], false)
	p, err := conf.Load()
	if err != nil {
		fmt.Println(err)
		return
	}

	w := NewWalker(p)

	for _, pkg := range p.InitialPackages() {
		for _, file := range pkg.Files {
			w.Walk(file, pkg, true)
		}
	}

	w.PrintPretty()
}

package main

import (
	"fmt"
	"os"

	"golang.org/x/tools/go/loader"
)

func main() {
	var conf loader.Config

	conf.CreateFromFilenames(".", os.Args[1:]...)
	p, err := conf.Load()
	if err != nil {
		fmt.Println(err)
		return
	}

	w := NewWalker(p)

	for _, pkg := range p.InitialPackages() {
		for _, file := range pkg.Files {
			w.Walk(file, pkg, true)
		}
	}

	w.PrintPretty()
}

--- 
+++ 
@@ -10,7 +10,8 @@
 func main() {
 	var conf loader.Config
 
-	conf.CreateFromFilenames(".", os.Args[1:]...)
+	//conf.CreateFromFilenames(".", os.Args[1:]...)
+	conf.FromArgs(os.Args[1:], false)
 	p, err := conf.Load()
 	if err != nil {
 		fmt.Println(err)
Add correct path and args
