Thanks!

I've used the full github path (github.com/benhoyt/littlelang/tokenizer) 
> for my subpackages when importing them but the tradeoffs for your approach (. 
> "littlelang/tokenizer") isn't clear to me.
>

Aha, thanks, I've finally realized why using full import paths (import 
"github.com/benhoyt/littlelang/foo" vs import "littlelang/foo") is 
important. I had my project at ~/go/src/littlelang, but when you "go get" 
it it puts it at ~/go/src/github.com/benhoyt/littlelang and the relative 
imports don't work. Fixed.

I used the "dot" import for tokenizer so I can just use "if p.tok == COMMA" 
instead of "if p.tok == tokenizer.COMMA" everywhere. I think it's okay as I 
designed tokenizer's exported names to be fairly unique (ALL_CAPS for token 
names, and Token and NewTokenizer).

-Ben

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to