i wrote a command to deal with this a little while ago,
reaching towards an easier way to manage package
versioning in go:
http://godoc.org/launchpad.net/govers
it's optimised towards changing version numbers
of imported packages (assuming the version number
is embedded in the path), but can be used
for your kind of task too.
govers's main attraction is that it recursively checks
dependencies to make sure that you don't end up
with your code using multiple copies of a given package
because it's imported twice with different names.
it's also a little less prescriptive than goven - it does
not assume that you want to copy a remote dependency
into the local directory.
your example using govers could be something like this:
$ cd my-package
$ govers -m 'github\.com/gorilla'
hg.example.com/go/github/com/gorilla
$
note that this will change all imports of packages under
githup.com/gorilla
(which is usually what you want). if you want an exact match, you
can anchor the match pattern:
$ govers -m 'github\.com/gorilla/mux$'
hg.example.com/go/github.com/gorilla/mux.hg
hope this helps,
rog.
> --
> 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...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>