Skip to content

Feature request: Selective imports #212

Closed
@gopherbot

Description

@gopherbot

by kirklin.mcdonald:

It would be nice to be able to cherry-pick symbols from a package to use by 
their unqualified names. To steal the syntax used by D for this purpose, we 
would have:

import "fmt" : Printf

With this, Printf would become a name within the file's namespace referring 
to fmt.Printf. The import would not insert any other names into the file's 
namespace (not even fmt).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions