gopherdata/gophernotes

inferred package names don't work

kevinburke opened this issue · 4 comments

I tried this:

import yaml "gopkg.in/yaml.v2"

yields the following error when I try to use it:

undefined: yaml in yaml.Unmarshal

Ah, yes this doesn't work, because it assuming everything after the import is the path. Maybe need to do a split on the spaces and process that inferred name.

Just checked, and this allow effects empty imports.

I can fix this on the gophernotes side, but apparently the "quickfix" I'm using to deal with things like "imported and not used," doesn't play nice with named imports: https://github.com/gopherds/gophernotes/blob/master/vendor/github.com/motemen/go-quickfix/quickfix.go#L272

Will need to fix this in that package, or find another way to do the quickfix stuff.

Duplicate with #59. Closing in favor of that issue. Hopefully we can address this soon.