I have a snippet like this:
f, err := parser.ParseFile(fset, ".", nil, 0)
if err != nil {
panic(err)
}
for _, s := range f.Imports {
fmt.Println(i.Path.Value) //prints import path
}
How can I get the alias of the import? Like if I have:
import (
test "github.com/username/some-repo"
)
How can I get the alias test?