Reputation: 22492
Consider the Go code below..
package main
import "go/token"
import "python/token"
func main() {
x := token.INDENT
}
What is the best way to solve the ambiguity of token in the above code? Is there something similar to the python expression of import python.token as pytoken
?
Upvotes: 3
Views: 526
Reputation: 166598
For example,
package main
import "go/token"
import pytoken "python/token"
func main() {
g := token.INDENT // "go/token"
p := pytoken.INDENT // "python/token"
}
Upvotes: 5